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

[enhancement] Set inbound_fee_offset relativ to outbound fee of a peer #121

Open
warioishere opened this issue Feb 11, 2025 · 1 comment

Comments

@warioishere
Copy link

warioishere commented Feb 11, 2025

Hello,

Would it be possible to implement a feature in charge-lnd that allows setting inbound fees dynamically based on the outbound fee of a channel?

For example, if a channel has an externally set outbound feerate of 400 ppm, charge-lnd should be able to apply a predefined negative fee offset, such as -40 ppm, resulting in an inbound fee of -360 ppm.

The idea is to let charge-lnd retrieve the outbound feerate and then apply a custom discount to determine the inbound fee.

A potential configuration could look like this:

[inbound-fee-policy]

node.id = file:///home/lnd/inbound_discount_peers.list

strategy = discount from outboundfee
inbound_base_fee_msat_offset = -40

This would allow defining a list of peers in a file, for whom charge-lnd automatically applies an inbound fee offset based on their outbound fee.

A similar approach has reportedly led to significant liquidity flow improvements and a 20-25% profit increase in another project, and would let to a better atumatization of the liquidy managment of a routing node making things a bit easy for a noderunner :)

Would this be feasible for charge-lnd?

Greetings from wario

@feelancer21
Copy link
Contributor

The parameter you are looking for is called inbound_level_ppm. If you set it, the inbound fee rate is calculated by min(inbound_level_ppm - fee_ppm; 0). Hence you have to set it to 40.

7f65145

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