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

Fee calculation rules unclear #321

Open
emplexity opened this issue Mar 22, 2022 · 0 comments
Open

Fee calculation rules unclear #321

emplexity opened this issue Mar 22, 2022 · 0 comments

Comments

@emplexity
Copy link

Background

Quoting from https://github.com/lightninglabs/docs.lightning.engineering/blob/master/lightning-network-tools/lnd/channel-fees.md, " Fees are applied only once per channel by the party which is forwarding the fee. Meaning, as you push a payment to your neighbor node, you are able to charge a fee, and as payments are pushed to you, your neighbor charges the fee, even if the channel was created by you."

Inferring from the fees calculated by LND suggests that the fees charged & received by a node X forwarding a payment are calculated using the base fees and fee rates as set by node X for the inbound channel and outbound channel of the forwarded payment by the following formula: feed charged = max (fee(inbound channel), fee(outbound channel)).

The documentation is not explicit about the rules that LND uses to establish the fees and about their impact on how a node uses these rules in the payment routing policy.
Your environment

version of lnd lncli version 0.14.1-beta commit=v0.14.1-beta
which operating system (uname -a on *Nix) Ubuntu server 16.04
version of btcd, bitcoind, or other backend Bitcoin Core RPC client version v22.0.0
any other relevant environment details

Steps to reproduce

Documentation issue, see above
Expected behaviour

The document should be explicit about the rules used to calculate and charge the fee by a node on the basis of the fee policy that this node applies for its channels, taking into account whether the channel is inbound or outbound for the payment.
The documentation should be explicit about the impact of these rules on the routing policy of a payment.
Actual behaviour

Not clear whether the fees charged by a node are based on the inbound channel and/or outbound channel fee policy(ies).

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

1 participant