lnresearch / Price-Of-Anarchy-in-Selfish-Routing

We provide a model how the Price of Anarchy can be described on the Lightning Network under selfish behavior of sending nodes
MIT License
6 stars 4 forks source link

Relate uncertainty cost to fee settings & expected drain of a node #2

Open renepickhardt opened 2 years ago

renepickhardt commented 2 years ago

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 depletedistribution

@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 variable s where I used d now. As I don't know what s stands for I switched to d 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) or exp((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 of 1/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 teram c/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 the ppm we would have in the optimally reliable and cheap case a combined function that seems something like 1/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).

renepickhardt commented 1 year 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:

  1. Does this analytically gives the exp Model?
  2. What happens if people are strategic by assuming everyone else is also strategic. E.g. how does the nash equilibrium look like instead of just pure greedy selfish local optimization?