The Lightning Network, a key technology built on top of Bitcoin, promises faster and cheaper transactions by moving them off the main blockchain. However, payments can fail when channels run out of funds, disrupting user experience and limiting scalability. Researchers have now developed a mathematical model that predicts when these failures occur, linking the time to the network's structure and channel capacities. This work provides a foundation for designing more robust payment systems, crucial as cryptocurrencies seek broader adoption.
In a study published on arXiv, researchers analyzed a random process inspired by Lightning Network payments. They found that the time until the first payment failure depends critically on the ratio between the square of an edge's capacity and its betweenness centrality—a measure of how often that edge lies on shortest paths between nodes. For a complete graph where all nodes are connected, with each edge having capacity 2k, they proved that the failure time is between Ω(k²n²/log n) and O(k²n²) with high probability, where n is the number of nodes. This means that doubling the capacity roughly quadruples the time before failures, highlighting the importance of sufficient funding in channels.
The researchers modeled payments as a discrete-time process on an undirected graph. At each round, a source and destination node are chosen uniformly at random, and a shortest path between them is selected uniformly at random. A unit payment is then executed along this path, updating the balances of all edges involved. The process continues until an edge becomes empty in one direction, indicating a payment failure. For complete graphs, this was shown to be equivalent to a system of independent birth-and-death chains, where each edge's balance behaves like a random walk hitting boundaries at ±k. This equivalence simplified the analysis, allowing the use of concentration inequalities like Chernoff bounds to derive probabilistic guarantees on failure times.
Simulations validated the theoretical bounds, with on complete graphs closely matching the predicted lower bound, suggesting it may be tight. For example, with fixed edge capacity of 512, the average failure time scaled similarly to k²n²/log n as n increased up to 2800 nodes. In ring graphs with 4096 nodes, the failure time grew faster than in a system of independent chains with the same update probabilities, indicating that correlations between edges in paths can accelerate failures. On a real Lightning Network snapshot with 14,900 nodes and 47,087 edges, simulations showed that payments of 100k satoshis failed quickly under original capacity distributions, but redistributing capacity evenly improved resilience, and optimizing so that ke²/g(e) is constant across edges boosted average failure times by nearly 20 times.
Extend beyond academic interest, offering practical insights for network designers and users. By understanding how edge-betweenness and capacity interact, stakeholders can allocate resources more effectively to minimize failures. For instance, channels with high betweenness—those frequently used in payments—may require higher capacities to sustain transaction flow. This could inform strategies for node operators in the Lightning Network to enhance reliability. However, the model assumes uniform random selection of source-destination pairs and shortest paths, which may not fully capture real-world payment patterns where certain nodes or routes are preferred.
Limitations of the study include the gap of a log n factor between upper and lower bounds for general graphs, which the researchers conjecture could be closed by improving the upper bound. The model also ignores fees and other details of the actual Lightning Network, focusing on the core graph-theoretic problem. Additionally, the simulations on the Lightning Network used thought experiments for capacity redistribution, as centralized modification is not feasible in practice. Future work could explore more realistic payment distributions or incorporate multi-part payments to further refine predictions.
Original Source
Read the complete research paper
About the Author
Guilherme A.
Former dentist (MD) from Brazil, 41 years old, husband, and AI enthusiast. In 2020, he transitioned from a decade-long career in dentistry to pursue his passion for technology, entrepreneurship, and helping others grow.
Connect on LinkedIn