Skip to content

Optional setting to dip into trampoline relay fees - #3372

Open
t-bast wants to merge 2 commits into
masterfrom
node-relay-fees
Open

Optional setting to dip into trampoline relay fees#3372
t-bast wants to merge 2 commits into
masterfrom
node-relay-fees

Conversation

@t-bast

@t-bast t-bast commented Aug 27, 2026

Copy link
Copy Markdown
Member

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.

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.
@t-bast
t-bast requested a review from pm47 August 27, 2026 12:56
case p@PaymentPart(_, _, _, Some(route), _) => route.head.fee(p.amountWithFees)
}.sum
} else {
0 msat

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figure we could maybe set a minimum relay fee here (and in PaymentLifeCycle), WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think we should repurpose the relay.fees.min-trampoline section of eclair.conf for that, shouldn't we?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

2 participants