Scale the success probability of channels without info down by 75%
authorMatt Corallo <git@bluematt.me>
Mon, 24 Apr 2023 22:53:28 +0000 (22:53 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 19 Sep 2023 21:23:28 +0000 (21:23 +0000)
commit5f98c399274839f5523018aad0a7e5ee31ec9d02
treef1fb3b6746a45fc142314e9e85979fb6cec7183c
parent75438900b271e09a54c6e97ca9339ac0e36c055f
Scale the success probability of channels without info down by 75%

If we are examining a channel for which we have no information at
all, we traditionally assume the HTLC success probability is
proportional to the channel's capacity. While this may be the case,
it is not the case that a tiny payment over a huge channel is
guaranteed to succeed, as we assume. Rather, the probability of
such success is likely closer to 50% than 100%.

Here we try to capture this by simply scaling the success
probability for channels where we have no information down
linearly. We pick 75% as the upper bound rather arbitrarily - while
50% may be more accurate, its possible it would lead to an
over-reliance on channels which we have paid through in the past,
which aren't necessarily always the best candidates.

Note that we only do this scaling for the historical bucket
tracker, as there we can be confident we've never seen a successful
HTLC completion on the given channel. If we were to apply the same
scaling to the simple liquidity bounds based scoring we'd penalize
channels we've never tried over those we've only ever fails to pay
over, which is obviously not a good outcome.
lightning/src/routing/scoring.rs