Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting a negative fee rate. #5835

Closed
legendarymartini opened this issue Oct 6, 2021 · 2 comments
Closed

Allow setting a negative fee rate. #5835

legendarymartini opened this issue Oct 6, 2021 · 2 comments

Comments

@legendarymartini
Copy link

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: 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

@alexbosworth
Copy link
Contributor

Fees are not signed in the current gossip protocol, maybe you would want to discuss this idea on the protocol level: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-channel_update-message

@legendarymartini
Copy link
Author

Ok, good to know. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants