<oembed><type>rich</type><version>1.0</version><title>Elias Rohrer [ARCHIVE] wrote</title><author_name>Elias Rohrer [ARCHIVE] (npub12v…7qc6w)</author_name><author_url>https://yabu.me/npub12v3sf3cjg33dwx6g5em2l9h0tuf3xjky5pdtuhclfaw852ukt6xqf7qc6w</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2021-03-18&#xA;📝 Original message:&#xA;Dear René,&#xA;&#xA;thank you for the great work!&#xA;&#xA;One quick question regarding the consequence you mentioned: it seems &#xA;plausible that manipulating the path choices would become harder, if the &#xA;ability of doing so was correlated with the capacity locked in the &#xA;network. However, if paths were only chosen regarding the probability of &#xA;payment success (and neglecting accruing fees), couldn&#39;t high-capacity &#xA;nodes in absence of competition simply raise their fee levels &#xA;indefinitely, since they would be chosen regardless? Do you have any &#xA;ideas how to protect against this?&#xA;&#xA;I imagine that some kind of &#39;mixed&#39; strategy could be reasonable, in &#xA;which certain paths are pre-filtered based on the probability of payment &#xA;success, and then the final path is selected along the lines of the &#xA;currently deployed fee rate/CLTV risk assessment?&#xA;&#xA;Kind Regards,&#xA;&#xA;Elias&#xA;&#xA;On 17 Mar 2021, at 13:50, René Pickhardt via Lightning-dev wrote:&#xA;&#xA;&gt; Dear fellow Lightning Network developers,&#xA;&gt;&#xA;&gt; I am very pleased to share with you some research progress [0] with &#xA;&gt; respect&#xA;&gt; to achieving better payment path finding and a better reliability of &#xA;&gt; the&#xA;&gt; payment process.&#xA;&gt;&#xA;&gt; TL;DR summary: In payment (multi)path finding use the (multi)paths &#xA;&gt; with the&#xA;&gt; highest success probability instead of the shortest or cheapest ones.&#xA;&gt; (multi)path success probability is the product of channel success&#xA;&gt; probabilities. Given current data crawled on the Network the channel&#xA;&gt; success probability grows with the capacity of the channel and with &#xA;&gt; smaller&#xA;&gt; amounts that are to be sent (which is both intuitively obvious).&#xA;&gt; (Multi)path success probability thus declines exponentially the more&#xA;&gt; uncertain channels are included.&#xA;&gt;&#xA;&gt; I understand that the actual payment path finding is not part of the &#xA;&gt; spec&#xA;&gt; but I think my results should be relevant to the list since:&#xA;&gt;&#xA;&gt; a) The payment pathfinding is currently based on trial and error &#xA;&gt; approach&#xA;&gt; which has consequences that have not been studied well in the context &#xA;&gt; of&#xA;&gt; the Lightning Network&#xA;&gt; b) All implementations will use some heuristics in order to achieve&#xA;&gt; pathfinding.&#xA;&gt; c) Quick path finding is a crucial for a good user experience.&#xA;&gt; d) The uncertainty of payment paths is frequently quoted as a major&#xA;&gt; criticism of the Lightning Network (c.f. [1]) and I believe the &#xA;&gt; methodology&#xA;&gt; of this paper can be used to address this.&#xA;&gt;&#xA;&gt; The main breakthrough is that  a very simple model that puts the&#xA;&gt; uncertainty of channel balances at its heart. We belief the &#xA;&gt; uncertainty of&#xA;&gt; channel balance values is the main reason why some payments take &#xA;&gt; several&#xA;&gt; attempts and thus take more time.  With the help of probability theory &#xA;&gt; we&#xA;&gt; are able to define the channel success and failure probabilities and&#xA;&gt; similarly (multi)path success and failure probabilities. Other Failure&#xA;&gt; reasons could also be included to the probability distributions.&#xA;&gt;&#xA;&gt; With the help of crawling small samples of the network we observe that &#xA;&gt; the&#xA;&gt; probability distributions of the channel balances can be estimated &#xA;&gt; well&#xA;&gt; with a uniform distribution (which was a little bit surprising) but &#xA;&gt; leads&#xA;&gt; to surprisingly easy formulas.  We are able to quantify the &#xA;&gt; uncertainty in&#xA;&gt; the channels and use negative Bernoulli trials to compute the expected&#xA;&gt; number of attempts that are necessary to deliver a payment of a &#xA;&gt; particular&#xA;&gt; amount from one node to another participant of the network. This can &#xA;&gt; be&#xA;&gt; used to abort the trial and error path finding if the probability &#xA;&gt; becomes&#xA;&gt; to low (expected number of attempts too high)&#xA;&gt;&#xA;&gt; We can mathematically show what people already knew (and draw &#xA;&gt; conclusions&#xA;&gt; like the mentioned ones from it):&#xA;&gt;&#xA;&gt; a) smaller amounts have higher success probabilities&#xA;&gt; b) the success probability declines exponentially with the number of&#xA;&gt; uncertain channels in a (multi)path.&#xA;&gt; c) depending on the payment pair, amount and splitting strategy it can &#xA;&gt; be&#xA;&gt; decided into how many parts a payment should be split to achieve the&#xA;&gt; highest success probability.&#xA;&gt; d) In particular for small amounts splitting almost never makes sense.&#xA;&gt;&#xA;&gt; We demonstrate that sorting paths by their descending success &#xA;&gt; probability&#xA;&gt; during the trial and error payment process (instead of currently used&#xA;&gt; heuristics like fees or route length) and updating the probabilities &#xA;&gt; from&#xA;&gt; current failures decreases the number of average attempts and produces &#xA;&gt; a&#xA;&gt; much faster delivery of payments.&#xA;&gt;&#xA;&gt; Additionally we looked what happened if BOLT14 [2] was implemented or &#xA;&gt; nodes&#xA;&gt; otherwise would pro-actively rebalance their channels according to &#xA;&gt; previous&#xA;&gt; research [3] and realized that the observed prior distribution changes &#xA;&gt; from&#xA;&gt; uniform to normal. This is great as small payments become even more &#xA;&gt; likely&#xA;&gt; (as one would intuitively assume and as previously showed) Our results &#xA;&gt; show&#xA;&gt; that probabilisitic path finding on a rebalanced network works even &#xA;&gt; better&#xA;&gt; (as in fewer failed attempts) which is yet another hint why BOLT14 &#xA;&gt; might be&#xA;&gt; a good idea. However as mentioned the results can be implemented even&#xA;&gt; without BOLT14 or without other protocol changes by any &#xA;&gt; implementation.&#xA;&gt;&#xA;&gt; One consequence from the paper that is not discussed heavily within &#xA;&gt; the&#xA;&gt; paper that I find pretty interesting is that if implementations follow &#xA;&gt; the&#xA;&gt; recommendation to use a probabilistic approach they will tend to route&#xA;&gt; payments along high capacity channels. While the fee based routing can&#xA;&gt; easily be gamed by dumping fees it is much harder to provide more&#xA;&gt; liquidity. And if done this would actually provide a service to the&#xA;&gt; network. This means that nodes which provide a lot of liquidity and &#xA;&gt; thus&#xA;&gt; utility might be able to charge higher fees (as long as they are small&#xA;&gt; enough so that users are willing to pay them) which would probably &#xA;&gt; allow&#xA;&gt; the emergence of a real routing fee market.&#xA;&gt;&#xA;&gt; One note on the question of MPP: In the last couple weeks I have been&#xA;&gt; collaborating with Christian Decker. I belief (by using the &#xA;&gt; methodology&#xA;&gt; from this paper) to also have a definite solution to the question of:&#xA;&gt;&#xA;&gt; How to split a payment into k parts and how many funds to allocate to &#xA;&gt; each&#xA;&gt; path to increase the (multi)path success probability.&#xA;&gt;&#xA;&gt; While this is is not addressed in the attached paper as we still need &#xA;&gt; to&#xA;&gt; run evaluations I can already share that an equal sized split as used &#xA;&gt; in&#xA;&gt; the paper (and by some implementations) is not preferable as one can &#xA;&gt; easily&#xA;&gt; see from this example:&#xA;&gt; Imagine one is to deliver 100 satoshi and has to paths with 1 &#xA;&gt; uncertain&#xA;&gt; channel on each path. The first of capacity 101 and  the second of 51.&#xA;&gt; Obviously trying to send 100 satoshi along the 101 capacity channel is &#xA;&gt; bad.&#xA;&gt; Similarly splitting 50/50 and sending 50 Satoshi along the 51 satoshi&#xA;&gt; capacity channel is also bad. Thus a split that allocates for example &#xA;&gt; 67&#xA;&gt; Satoshi to the 101 capacity and 33 to the 51 satoshi channel seems way &#xA;&gt; more&#xA;&gt; reasonable. Actually 75/25 would probably be the best solution for &#xA;&gt; such a&#xA;&gt; setting. And no it is only random coincident that a binary splitter &#xA;&gt; would&#xA;&gt; have arrived at that split eventually (after potential miss trials)&#xA;&gt; There is way more math theory of how to actually solve the &#xA;&gt; optimization&#xA;&gt; problem in the general case and how to find a split and paths that&#xA;&gt; maximizes the probability of the attempts. I cannot share these &#xA;&gt; results yet&#xA;&gt; but I am pretty confident that there will be updates on that end very &#xA;&gt; soon.&#xA;&gt;&#xA;&gt; with kind regards Rene&#xA;&gt;&#xA;&gt; [0]: https://arxiv.org/abs/2103.08576 Security and Privacy of &#xA;&gt; Lightning&#xA;&gt; Network Payments with Uncertain Channel Balances&#xA;&gt; [1]:&#xA;&gt; https://www.whatbitcoindid.com/podcast/peter-rizuns-lightning-critique-fud-or-fair&#xA;&gt; [2]: https://github.com/lightningnetwork/lightning-rfc/pull/780&#xA;&gt; [3]:&#xA;&gt; https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002406.html&#xA;&gt;&#xA;&gt; -- &#xA;&gt; https://www.rene-pickhardt.de&#xA;&gt;&#xA;&gt; Skype: rene.pickhardt&#xA;&#xA;&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210318/e55f0d5d/attachment-0001.html&gt;</html></oembed>