@@ -1134,6 +1134,7 @@ are selling.
1134
1134
* [ ` u16 ` :` funding_weight ` ]
1135
1135
* [ ` u16 ` :` funding_fee_basis ` ]
1136
1136
* [ ` u32 ` :` funding_fee_base_sat ` ]
1137
+ * [ ` u32 ` :` channel_creation_fee_sat ` ]
1137
1138
1138
1139
Sellers also define how the fees can be paid by listing the ` payment_type ` s
1139
1140
they support.
@@ -1201,16 +1202,27 @@ When `request_funds` and `will_fund` have been exchanged, the buyer agrees to
1201
1202
pay fees to the seller for the funding they provide to the channel based on
1202
1203
the proposed ` funding_weight ` , ` funding_fee_basis ` and ` funding_fee_base_sat ` .
1203
1204
1205
+ If the buyer is opening a new channel, an additional ` channel_creation_fee_sat `
1206
+ is applied. This can be used to hedge some of the future cost of closing that
1207
+ channel, which doesn't apply when additional liquidity is purchased on an
1208
+ existing channel (since the creation fee has already been paid).
1209
+
1204
1210
The funding fee has three components:
1205
1211
1206
- * a fixed amount: ` funding_fee_base_sat `
1212
+ * a fixed amount:
1213
+ * ` funding_fee_base_sat ` if liquidity is purchased on an existing channel
1214
+ * ` funding_fee_base_sat + channel_creation_fee_sat ` when opening a channel
1207
1215
* a proportional amount based on the seller's ` funding_amount ` :
1208
1216
* ` paid_funding_contribution = min(funding_amount, request_funds.requested_sats) `
1209
1217
* ` funding_fee_proportional_sat = paid_funding_contribution * funding_fee_basis / 10_000 `
1210
1218
* a contribution to the on-chain fees paid by the seller:
1211
1219
* ` funding_fee_mining_sat = funding_weight * funding_feerate_perkw / 1000 `
1212
1220
1213
- The total fee is then:
1221
+ The total fee for a channel creation is then:
1222
+
1223
+ funding_fee_total = funding_fee_base_sat + channel_creation_fee_sat + funding_fee_proportional_sat + funding_fee_mining_sat
1224
+
1225
+ The total fee for buying liquidity on an existing channel is:
1214
1226
1215
1227
funding_fee_total = funding_fee_base_sat + funding_fee_proportional_sat + funding_fee_mining_sat
1216
1228
@@ -1228,6 +1240,8 @@ A node advertising a `funding_rate`:
1228
1240
- MUST set ` min_funding_amount_sat ` and ` max_funding_amount_sat ` to the
1229
1241
minimum and maximum amount it will contribute at this rate.
1230
1242
- MUST set ` funding_fee_base_sat ` to the base fee (in satoshi) it will charge.
1243
+ - MUST set ` channel_creation_fee_sat ` to the additional fee it will charge for
1244
+ channel creation.
1231
1245
- MUST set ` funding_fee_basis ` to the amount it will charge per contributed
1232
1246
satoshi (in basis points, ie 1/10_000).
1233
1247
- MUST set ` funding_weight ` to the transaction weight that will be charged.
@@ -1254,28 +1268,30 @@ The seller contributes `1_100_000 sats` with the following funding rate:
1254
1268
1255
1269
funding_weight = 444
1256
1270
funding_fee_base_sat = 233 sats
1271
+ channel_creation_fee_sat = 500 sats
1257
1272
funding_fee_basis = 22
1258
1273
1259
1274
The funding fee is:
1260
1275
1261
1276
funding_fee_base_sat = 233 sats
1277
+ channel_creation_fee_sat = 500 sats
1262
1278
funding_fee_proportional_sat = min(1_000_000, 1_100_000) * 22 / 10_000 = 2200 sats
1263
1279
funding_fee_mining_sat = 444 * 2500 / 1000 = 1110 sats
1264
- funding_fee_total = 3543 sats
1280
+ funding_fee_total = 4043 sats
1265
1281
1266
1282
The outputs to the peers in the commitment transaction will be
1267
1283
1268
1284
to-buyer: 500_000 sats
1269
- to-seller: 1_103_543 sats
1285
+ to-seller: 1_104_043 sats
1270
1286
1271
1287
The miner fee for the buyer will be ` 720 * 2500 / 1000 = 1800 sats ` .
1272
1288
1273
1289
Minimum funds that the buyer must contribute to the funding transaction:
1274
1290
1275
1291
open_channel2.funding_satoshis: 500_000 sats
1276
- funding fee: 3_543 sats
1292
+ funding fee: 4_043 sats
1277
1293
miner fee: 1_800 sats
1278
- total required contribution: 505_343 sats
1294
+ total required contribution: 505_843 sats
1279
1295
1280
1296
Minimum funds that the seller must contribute to the funding transaction:
1281
1297
0 commit comments