Optional setting to dip into trampoline relay fees - #3372
Open
t-bast wants to merge 2 commits into
Open
Conversation
Many service providers (lightning nodes that provide services to mobile wallets that support it) get paid by adding a fee to the routing hints of the end user's invoices: this lets them be paid a fee that may be larger than their usual relay fees when wallet users receive payments. That can compete with the fees collected by intermediate trampoline nodes, so we provide a new setting (disabled by default) that lets trampoline nodes relay payments without collecting their full relay fee. It is up to each trampoline node to decide whether they are ok with having more payments succeed with a smaller per-payment revenue or not.
pm47
reviewed
Aug 28, 2026
| case p@PaymentPart(_, _, _, Some(route), _) => route.head.fee(p.amountWithFees) | ||
| }.sum | ||
| } else { | ||
| 0 msat |
Member
There was a problem hiding this comment.
I figure we could maybe set a minimum relay fee here (and in PaymentLifeCycle), WDYT?
Member
Author
There was a problem hiding this comment.
Then I think we should repurpose the relay.fees.min-trampoline section of eclair.conf for that, shouldn't we?
Member
Author
There was a problem hiding this comment.
I've tried a different approach in 88102e1, which lets us more flexibly configure a threshold trampoline fee that's different from the channel fees.
Note that this is somewhat unrelated to the line of code you're commenting on, which just computes local vs total path fees for reporting.
Another approach, slightly different from the previous commit, where we instead set a floor for trampoline fees that may be different from our local channel fees when trampoline payments contain a routing hint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many service providers (lightning nodes that provide services to mobile wallets that support it) get paid by adding a fee to the routing hints of the end user's invoices: this lets them be paid a fee that may be larger than their usual relay fees when wallet users receive payments.
That can compete with the fees collected by intermediate trampoline nodes, so we provide a new setting (disabled by default) that lets trampoline nodes relay payments without collecting their full relay fee. It is up to each trampoline node to decide whether they are ok with having more payments succeed with a smaller per-payment revenue or not.