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

[bug]: Positive inbound fees mess with route finding #9058

Open
DerEwige opened this issue Sep 2, 2024 · 2 comments
Open

[bug]: Positive inbound fees mess with route finding #9058

DerEwige opened this issue Sep 2, 2024 · 2 comments
Labels
bug Unintended code behaviour inbound fee Changes related to inbound routing fee

Comments

@DerEwige
Copy link

DerEwige commented Sep 2, 2024

By deactivating a security switch, it is possible to set positive inbound fees on LND nodes.
Channels with positive inbound fees are not backwards compatible and they mess with the route finder in an unexpected way.

If a node (not knowing about inbound fees) tries a route containing a single hop with positive inbound fees, that route will fail.
The failure is “insufficient Fee” at node X. When receiving this error the sender will attribute that error to the outbound channel of the node.
But in reality, the error happened on the inbound channel.

By attributing the error to the wrong edge the ability to find routes decreases.
Currently this effect is not very strong, as there are only very few nodes with positive inbound fees.

Positive inbound fees should be forbiden (in it's current form) to avoid total routing colaps across the whole network

TLDR: positve routing fees int its current form are a bug by design at best, or an attack on the network at worst

@feelancer21
Copy link
Contributor

I don't see that as a bug by design. I could also write an HTLC interceptor and block forwards from Bob to Alice, while allowing forwards from Carol to Alice. The result would be the same: the sender would not see that the incoming channel was the issue.

Internally within LND, we encounter a similar problem when we lower the inbound discounts. It will also fail on the outbound channel, but no update is sent for the inbound policy.

#6967

@saubyk saubyk added inbound fee Changes related to inbound routing fee and removed needs triage labels Sep 2, 2024
@Roasbeef
Copy link
Member

Roasbeef commented Sep 3, 2024

Enabling positive inbound fees is off by default, it's also marked that it's a config field that really shouldn't be used at all outside of testing: https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf#L441-L446.

@feelancer21 also has a good point that nodes can arbitrarily reject payments via forwarding attempts, but that would disadvantage them, as they're giving up routing fees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour inbound fee Changes related to inbound routing fee
Projects
None yet
Development

No branches or pull requests

4 participants