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

Renepay const prob cost #7540

Merged

Commits on Aug 13, 2024

  1. renepay: add const probability cost

    The probability for a success forward of x amount on a channel is now
    computed as:
    
    	P_success(x) = b * P_rene(x)
    
    where P_rene(x) is the probability distribution proposed by Rene
    Pickhardt with a uniform distribution on the known liquidity of the
    channel and 'b' is a new parameter we add in this PR, by the name of
    "base probability". The "base probability" represents the probability
    for a channel in the network choosen at random to be able to forward at
    least 1msat, ie. of being alive, non-depleted and with at least one HTLC
    slot. We don't know the value of 'b', but for the moment we assume that
    it is 0.98 and use that as default.
    
    As a consequence the probability cost becomes non-linear and non-convex
    because of the additional constant term:
    
    	Cost(x) = - log P_success(x)
    	        = - log b  -  - log P_rene(x)
    		= - log b  +  Cost_rene(x)
    
    We currently don't handle well base fees and neither this additional
    "base probability" but we can as a first approximation linearize the
    cost function in this way:
    
    	Cost_linear(x) = (- log b)*x  +  Cost_rene_linear(x)
    
    Changelog-Added: renepay: Add a dev parameter to renepay that represents
    a constant probability of availability for all channels in the network.
    
    Signed-off-by: Lagrang3 <[email protected]>
    Lagrang3 committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    67ffd8d View commit details
    Browse the repository at this point in the history