Repository navigation
Conversation
Lagrang3
force-pushed
the
askrene-fee-headroom
branch
2 times, most recently
from
November 9, 2026 17:01
bb0585c to
9e45d47
Compare
ksedgwic
reviewed
Nov 10, 2026
ksedgwic
left a comment
Collaborator
There was a problem hiding this comment.
Concept ACK. The derivation in the comment is correct, and scaling both bounds by amount / (amount + maxfee) is the refinement suggested in #9380. Inline: one behaviour change for payments near the full balance of a local channel, a test gap, and four small items.
madelinevibes
force-pushed
the
askrene-fee-headroom
branch
from
November 11, 2026 06:27
9e45d47 to
018fc3c
Compare
Lagrang3
force-pushed
the
askrene-fee-headroom
branch
from
November 12, 2026 07:03
018fc3c to
b63c0cf
Compare
Even if refine does the job of adjusting the fee+amount to fit the known_max in a channel, the flow probability computation does not consider the eventual fees that a flow might carry. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
When the known max and known min are about the same value, the probability cost of sending x=value is zero and MCF will try it. It doesn't take into account the possibility that when we hit that channel the actual flow is x+fees. We adjust the min/max bounds by a factor of x/(x+fee) which effectively introduces headroom for fees. Changelog-Fixed: askrene-getroutes: Account for fees in the flow amount when computing probability costs. Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Lagrang3
force-pushed
the
askrene-fee-headroom
branch
from
November 12, 2026 08:32
ea7b2b8 to
c721134
Compare
This branch has not been deployed
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.
We modify the probability cost function to make it compute approximately the probability cost of
probability(flow + fees),previously we only did
probability(flow). The effects are: some capacity is reserved for fees and we obtain betternear optimal solutions.
This PR is the first part of #9380, because the change deserves its own PR.