You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In section "8.5 Fees" (page 49) of the lightning network white paper, a single sentence at the end of the section suggests using negative fees to encourage routing on certain channels. When trying to set a negative fee rate, though, I get an error that it is below the minimum. I tracked down where the error is generated in the code, and where the referenced minFeeRate constant is set , and I understand the rational outlined in the comments (a lower fee rate would result in a ppm that is less than 1 but greater than 0).
However, I believe that changing case req.FeeRate != 0 && req.FeeRate < minFeeRate: to case req.FeeRate != 0 && Abs(req.FeeRate) < minFeeRate: on line 6304 would provide the same protection, while allowing nodes to set negative fees, to essentially pay senders to help push liquidity out on a channel with excess local liquidity.
Your environment
version of lnd
0.13.3-beta
which operating system (uname -a on *Nix)
Linux lightning1 5.11.0-1019-raspi 20-Ubuntu SMP PREEMPT Tue Sep 21 15:23:42 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
version of btcd, bitcoind, or other backend
Bitcoin Core version v0.21.1
any other relevant environment details
Steps to reproduce
See above
Expected behaviour
Negative Fees FTW
Actual behaviour
Error Message
fee rate of -1e-06 is too small, min fee rate is 1e-06
The text was updated successfully, but these errors were encountered:
Background
In section "8.5 Fees" (page 49) of the lightning network white paper, a single sentence at the end of the section suggests using negative fees to encourage routing on certain channels. When trying to set a negative fee rate, though, I get an error that it is below the minimum. I tracked down where the error is generated in the code, and where the referenced minFeeRate constant is set , and I understand the rational outlined in the comments (a lower fee rate would result in a ppm that is less than 1 but greater than 0).
However, I believe that changing
case req.FeeRate != 0 && req.FeeRate < minFeeRate:
tocase req.FeeRate != 0 && Abs(req.FeeRate) < minFeeRate:
on line 6304 would provide the same protection, while allowing nodes to set negative fees, to essentially pay senders to help push liquidity out on a channel with excess local liquidity.Your environment
version of
lnd
0.13.3-beta
which operating system (
uname -a
on *Nix)Linux lightning1 5.11.0-1019-raspi 20-Ubuntu SMP PREEMPT Tue Sep 21 15:23:42 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
version of
btcd
,bitcoind
, or other backendBitcoin Core version v0.21.1
any other relevant environment details
Steps to reproduce
See above
Expected behaviour
Negative Fees FTW
Actual behaviour
Error Message
fee rate of -1e-06 is too small, min fee rate is 1e-06
The text was updated successfully, but these errors were encountered: