@@ -514,11 +514,6 @@ The origin node:
514
514
- SHOULD NOT create redundant ` channel_update ` s
515
515
- If it creates a new ` channel_update ` with updated channel parameters:
516
516
- SHOULD keep accepting the previous channel parameters for 10 minutes
517
- - If it is the seller of a currently active ` duration_based_funding_lease ` on this channel:
518
- - MUST NOT set ` fee_base_msat ` greater than ` max_channel_fee_base_msat `
519
- (as committed to in ` will_fund.signature ` ).
520
- - MUST NOT set ` fee_proportional_millionths ` greater than ` max_channel_fee_basis * 100 `
521
- (as committed to in ` will_fund.signature ` ).
522
517
523
518
The receiving node:
524
519
- if the ` short_channel_id ` does NOT match a previous ` channel_announcement ` ,
@@ -1172,9 +1167,6 @@ are selling depending on the guarantees offered to buyers.
1172
1167
1 . type: 1 (` basic_funding_leases ` )
1173
1168
2 . data:
1174
1169
* [ ` ...*basic_funding_lease ` :` funding_lease_rates ` ]
1175
- 1 . type: 3 (` duration_based_funding_leases ` )
1176
- 2 . data:
1177
- * [ ` ...*duration_based_funding_lease ` :` funding_lease_rates ` ]
1178
1170
1179
1171
1 . subtype: ` request_funds `
1180
1172
2 . data:
@@ -1186,19 +1178,6 @@ are selling depending on the guarantees offered to buyers.
1186
1178
2 . data:
1187
1179
* [ ` u32 ` :` min_lease_amount_sat ` ]
1188
1180
* [ ` u32 ` :` max_lease_amount_sat ` ]
1189
- * [ ` funding_lease_fee ` :` funding_lease_fee ` ]
1190
-
1191
- 1 . ` lease_type ` : 3 (` duration_based_funding_lease ` )
1192
- 2 . data:
1193
- * [ ` u16 ` :` lease_duration ` ]
1194
- * [ ` u32 ` :` min_lease_amount_sat ` ]
1195
- * [ ` u32 ` :` max_lease_amount_sat ` ]
1196
- * [ ` funding_lease_fee ` :` funding_lease_fee ` ]
1197
- * [ ` u16 ` :` max_channel_fee_basis ` ]
1198
- * [ ` u32 ` :` max_channel_fee_base_msat ` ]
1199
-
1200
- 1 . subtype: ` funding_lease_fee `
1201
- 2 . data:
1202
1181
* [ ` u16 ` :` funding_weight ` ]
1203
1182
* [ ` u16 ` :` lease_fee_basis ` ]
1204
1183
* [ ` u32 ` :` lease_fee_base_sat ` ]
@@ -1214,14 +1193,6 @@ are selling depending on the guarantees offered to buyers.
1214
1193
* [ ` u16 ` :` funding_script_size ` ]
1215
1194
* [ ` funding_script_size ` :` funding_script ` ]
1216
1195
1217
- 1 . ` lease_witness_type ` : 3 (` duration_based_funding_lease_witness ` )
1218
- 2 . data:
1219
- * [ ` u32 ` :` lease_expiry ` ]
1220
- * [ ` u16 ` :` funding_script_size ` ]
1221
- * [ ` funding_script_size ` :` funding_script ` ]
1222
- * [ ` u16 ` :` max_channel_fee_basis ` ]
1223
- * [ ` u32 ` :` max_channel_fee_base_msat ` ]
1224
-
1225
1196
Sellers may offer multiple ` lease_type ` s, described in the following sections.
1226
1197
Buyers select a specific lease offered by the seller and use ` request_funds `
1227
1198
to purchase that lease. Sellers answer with ` will_fund ` containing a signature
@@ -1233,8 +1204,27 @@ A `basic_funding_lease` does not provide any guarantee that the seller won't
1233
1204
close the channel or increase their routing fees after the purchase, if the
1234
1205
liquidity isn't actually used.
1235
1206
1236
- The ` funding_lease_fee ` is paid as detailed in the ` funding_lease_fee ` section
1237
- below.
1207
+ When ` request_funds ` and ` will_fund ` have been exchanged, the buyer must pay
1208
+ fees to the seller for the funding they provide to the channel based on the
1209
+ agreed upon ` funding_weight ` , ` lease_fee_basis ` and ` lease_fee_base_sat ` .
1210
+
1211
+ The lease fee is taken from the buyer's funding inputs and added to the
1212
+ seller's channel balance during the funding flow. The buyer must contribute
1213
+ enough funds to cover their channel balance, the lease fee, and the on-chain
1214
+ fees for the weight of the funding transaction they're responsible for.
1215
+
1216
+ The lease fee has three components:
1217
+
1218
+ * a fixed amount: ` lease_fee_base_sat `
1219
+ * a proportional amount based on the seller's ` funding_amount ` :
1220
+ * ` paid_funding_contribution = min(funding_amount, request_funds.requested_sats) `
1221
+ * ` lease_fee_proportional_sat = paid_funding_contribution * lease_fee_basis / 10_000 `
1222
+ * a contribution to the on-chain fees paid by the seller:
1223
+ * ` lease_fee_mining_sat = funding_weight * funding_feerate_perkw / 1000 `
1224
+
1225
+ The lease fee is then:
1226
+
1227
+ lease_fee_total = lease_fee_base_sat + lease_fee_proportional_sat + lease_fee_mining_sat
1238
1228
1239
1229
The seller provides an ECDSA signature in ` will_fund ` using the private key
1240
1230
associated with their ` node_id ` . The data signed is:
@@ -1256,58 +1246,6 @@ A node selling a `basic_funding_lease`:
1256
1246
It ensures that the funding node is refunded for some of the on-chain
1257
1247
fees it will pay to contribute the requested funds to a channel.
1258
1248
1259
- ### The ` duration_based_funding_lease ` type
1260
-
1261
- A ` duration_based_funding_lease ` commits to a duration during which the seller
1262
- will not remove the funds nor increase their routing fees above the maximum
1263
- values provided in the lease. It is impossible to actually prevent them from
1264
- doing so, but the signature they provide in ` will_fund ` can be used to prove
1265
- that they cheated.
1266
-
1267
- The ` funding_lease_fee ` is paid as detailed in the ` funding_lease_fee ` section
1268
- below.
1269
-
1270
- The seller provides an ECDSA signature in ` will_fund ` using the private key
1271
- associated with their ` node_id ` . The data signed is:
1272
-
1273
- SHA256("duration_based_funding_lease" || duration_based_funding_lease_witness)
1274
-
1275
- We use a tagged hash to ensure that this signature cannot be used in a
1276
- different context.
1277
-
1278
- #### Requirements
1279
-
1280
- A node selling a ` duration_based_funding_lease ` :
1281
- - MUST set ` lease_duration ` to the number of blocks during which the lease
1282
- will be active.
1283
- - MUST set ` max_channel_fee_base_msat ` to the maximum ` fee_base_msat ` it
1284
- will use in its ` channel_update ` while the lease is active.
1285
- - MUST set ` max_channel_fee_basis ` to match (when converted from basis
1286
- points to millionths) the maximum ` fee_proportional_millionths ` it will
1287
- use in its ` channel_update ` while the lease is active.
1288
-
1289
- ### Paying the ` funding_lease_fee `
1290
-
1291
- When ` request_funds ` and ` will_fund ` have been exchanged, the buyer must pay
1292
- fees to the seller for the funding they provide to the channel based on the
1293
- agreed upon ` funding_lease_fee ` .
1294
-
1295
- The lease fee is taken from the buyer's funding inputs and added to the
1296
- seller's channel balance during the funding flow. The buyer must contribute
1297
- enough funds to cover their channel balance, the lease fee, and the on-chain
1298
- fees for the weight of the funding transaction they're responsible for.
1299
-
1300
- The lease fee has three components:
1301
-
1302
- * a fixed amount: ` lease_fee_base_sat `
1303
- * a proportional amount based on the seller's ` funding_amount ` :
1304
- * ` paid_funding_contribution = min(funding_amount, request_funds.requested_sats) `
1305
- * ` lease_fee_proportional_sat = paid_funding_contribution * lease_fee_basis / 10_000 `
1306
- * a contribution to the on-chain fees paid by the seller:
1307
- * ` lease_fee_mining_sat = funding_weight * funding_feerate_perkw / 1000 `
1308
-
1309
- The lease fee is then ` lease_fee_total = lease_fee_base_sat + lease_fee_proportional_sat + lease_fee_mining_sat ` .
1310
-
1311
1249
#### Example
1312
1250
1313
1251
A node contributes ` 500_000 sats ` to a channel and requests ` 1_000_000 sats `
0 commit comments