Author: ZmnSCPxj 2021-08-21 02:40:21
Published on: 2021-08-21T02:40:21+00:00
The article discusses various aspects of the Lightning Network, a second-layer solution for the Bitcoin blockchain that aims to improve scalability and reduce transaction fees. One important consideration is the cost of failed payments, which can be quantified in terms of the subjective value of Bitcoin used to make the payment compared to the value of the product being purchased. To estimate the probability of payment success, Pickhardt and Richter's 2021 paper proposes a method that can be used as a cost function for pathfinding algorithms.In addition to considering payment success probability, pathfinding algorithms must also factor in actual fees and total cltv-delta, which can be converted into an equivalent amount of BTCs. A rational buyer will only make a purchase if they believe the value of the product being bought is higher than the value of the BTCs they sacrifice to buy it. Therefore, the fee budget for a particular payment is the expected value from acquiring the product minus its price, subjectively determined by the payer, and provided to the C-Lightning payment algorithm.The cost of failure can then be calculated using the formula `fee_budget * (1 - success_probability)`. While this unified cost function cannot be used in existing pathfinding algorithms, the negative logarithm of the probability can be used instead if the `fee` term is small compared to the `fee_budget` term. As a heuristic, fees can be ignored, and only the negative log probability is used after pruning channels whose fees are very high. #zerobasefee is a specialized heuristic that assumes a 1-sat base fee is not negligible compared to the fee_budget and should not be pruned.However, for larger payments, a 1 satoshi base fee may actually be negligible, suggesting that #zerobasefee could potentially be generalized. The article also introduces the concept of alternative pathfinding, where an "aggregate" operation replaces the simple addition traditionally used in pathfinding algorithms. The author suggests that the type should be both Monoid and Ord and provides code examples of how this would look in practice. Ultimately, these considerations can help improve the efficiency and reliability of the Lightning Network.
Updated on: 2023-06-03T05:36:22.899103+00:00