Open renepickhardt opened 2 years ago
Most of this is solved by the markov Model introduced in this article: https://blog.bitmex.com/the-power-of-htlc_maximum_msat-as-a-control-valve-for-better-flow-control-improved-reliability-and-lower-expected-payment-failure-rates-on-the-lightning-network/
The open question are:
As indicated in this comment and hinted through this notebook using the depleted channel model the likelihood of the liquidity being fully depleted is not
100%
c.f. the diagram@bitromortac suggested to use and exponential model like
exp(-x/d) + exp((x-c)/d)
to explain the depletion towards one end of the channel. (originally he uses the variables
where I usedd
now. As I don't know whats
stands for I switched tod
because my feeling is it should come from the expected drain). The two terms in his model account for each mode. While @kammitama5 in #1 currently helps me to understand if the expected liquidity distribution of the depleted channel model indeed follows an exponential function I will assume the exponential model from @bitromortac for now.Taking the depleted channel model we can actually from the expected drain model the channels probability to be either
exp(-x/d)
(meaning a high likelihood that a lot of liquidity is on our end) orexp((x-c)/d)
(meaning a high likelhood that the liquidity is at the other end).in the first case the uncertainty cost (information content = -log(P(X>x))) is
x/d
which is linear with a unit cost of1/d
. In the second case the uncertainty cost (information content) is(c-x)/d =c/s - x/d = c/d - 1/d * x
. we have the none linear teramc/d
(reminding us of a base fee) and the negative (@niftynei !) linear uncertainty unit cost of-1/d
.All that being said here the actual issue:
while I am not sure how to handle the non linear term (and while it is quite surprising that it does not exist in the other direction as the problem should be symmetrical) I want to correlate the expected drains on the network to the fee settings of channels. IF indeed the uncertainty cost
1/d
correlates with the fees or can be a function of theppm
we would have in theoptimally reliable and cheap
case a combined function that seems something like1/d(ppm) + ppm
. This would indeed strengthen the current hypothesis shared by many people that node operators can indeed do flow control via setting their fees. And following the ideas of https://github.com/renepickhardt/mpp-splitter/issues/12 we could probably derive the dominant strategy for node operators to set fee rates. (Though that probably still lacks the the ability of sending nodes to not route for uncertainty cost and routing fees but against the expected drain).