Commit 181a0e8
committed
Make the base fee configurable in ChannelConfig
Currently the base fee we apply is always the expected cost to
claim an HTLC on-chain in case of closure. This results in
significantly higher than market rate fees [1], and doesn't really
match the actual forwarding trust model anyway - as long as
channel counterparties are honest, our HTLCs shouldn't end up
on-chain no matter what the HTLC sender/recipient do.
While some users may wish to use a feerate that implies they will
not lose funds even if they go to chain (assuming no flood-and-loot
style attacks), they should do so by calculating fees themselves;
since they're already charging well above market-rate,
over-estimating some won't have a large impact.
This commit adds a configuration knob to set the base fee
explicitly, defaulting to 1 sat, which appears to be market-rate
today.
[1] Note that due to an msat-vs-sat bug we currently actually
charge 1000x *less* than the calculated cost.1 parent 480bd85 commit 181a0e8
File tree
9 files changed
+139
-65
lines changed- lightning-background-processor/src
- lightning/src
- chain
- ln
- util
9 files changed
+139
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2846 | 2846 | | |
2847 | 2847 | | |
2848 | 2848 | | |
2849 | | - | |
| 2849 | + | |
2850 | 2850 | | |
2851 | 2851 | | |
2852 | 2852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | 458 | | |
460 | 459 | | |
461 | 460 | | |
| |||
3477 | 3476 | | |
3478 | 3477 | | |
3479 | 3478 | | |
3480 | | - | |
3481 | | - | |
3482 | | - | |
3483 | | - | |
3484 | | - | |
3485 | | - | |
3486 | | - | |
3487 | | - | |
3488 | | - | |
3489 | | - | |
3490 | | - | |
3491 | | - | |
3492 | | - | |
3493 | | - | |
3494 | | - | |
3495 | | - | |
3496 | | - | |
3497 | | - | |
| 3479 | + | |
| 3480 | + | |
3498 | 3481 | | |
3499 | 3482 | | |
3500 | 3483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | | - | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1544 | 1546 | | |
1545 | 1547 | | |
1546 | 1548 | | |
| |||
1605 | 1607 | | |
1606 | 1608 | | |
1607 | 1609 | | |
1608 | | - | |
| 1610 | + | |
1609 | 1611 | | |
1610 | 1612 | | |
1611 | 1613 | | |
| |||
4973 | 4975 | | |
4974 | 4976 | | |
4975 | 4977 | | |
4976 | | - | |
| 4978 | + | |
4977 | 4979 | | |
4978 | 4980 | | |
4979 | 4981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | | - | |
| 1319 | + | |
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| |||
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1344 | 1355 | | |
1345 | 1356 | | |
1346 | 1357 | | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | 1358 | | |
1355 | 1359 | | |
1356 | 1360 | | |
1357 | 1361 | | |
1358 | 1362 | | |
1359 | | - | |
| 1363 | + | |
| 1364 | + | |
1360 | 1365 | | |
1361 | 1366 | | |
1362 | 1367 | | |
| |||
0 commit comments