Blog

/

Enhancing Lightning Network Throughput with Stroom Network: An Experimental Analysis

Enhancing Lightning Network Throughput with Stroom Network: An Experimental Analysis

Injecting increased capacity into a Bitcoin Lightning Network node shows promising results in enhancing the network's throughput and improving overall transaction efficiency and scalability.

Stroom DAO Stroom DAO

5 min read

feature image

The Lightning Network has emerged as a powerful solution to Bitcoin's scalability problem. By enabling off-chain transactions, it significantly reduces congestion on the main Bitcoin blockchain, allowing for faster and cheaper transactions. However, as the adoption of Bitcoin and LN grows, so does the need for improved throughput and efficiency within the network.

Recently, we conducted an experiment designed to assess the impact of increasing capacity of a Lightning node on the network’s  throughput. Our goal was to understand how we can improve transfer capabilities, if at all, and to do that, we compared the network's base capacity with a simulated network enhanced by adding capacity to the Stroom node.

Methodology

Throughput Capacity Estimate

Whereas there is no uniform capacity of the Lightning Network in terms of volumes of payments that network can process, we introduced an intuitive heuristic that provides some estimate. To that end, we chose two random nodes — one as a source and the other as the  destination — and calculated the max Bitcoin flow that can be sent from the source node to the destination node, assuming that all distributions of balances in channels are in favor of the flow to be sent. While it is a very strong assumption, which is unlikely to be met in reality any time soon, the idea here was to use the same capacity approximation in both the base scenario and the simulated one, which would give us an idea about the processing capacity dynamics with the introduction of more payment channels. 

According to Max-flow Min-cut theorem, the maximum volume that can be sent is equal to the capacity of the minimum cut that divides source and destination. By sampling sources and destinations a randomly fixed amount of times, we add up the corresponding min-cuts’ capacities. The resulting metric gives us an estimate of the whole network’s processing capacity per period of time. 

Initial Setup

Our baseline Lightning Network graph is a current graph that has a total value locked of 4,582 BTC, providing a foundation for measuring the effects of adding increased capacity. This setup allowed us to establish a control environment against which we could compare the performance of the modified network.

Simulation

To simulate the behavior of a node , we increased the network's capacity by adding channels in increments of 500 BTC, up to a total of 5,000 BTC (around 10,000 BTC total value locked in the whole Lightning Network). The process involved:

  • Adding channels only to nodes with more than one existing channel.
  • Randomly setting each channel's capacity between 0.1 BTC and 0.5 BTC. 

This method ensured a more or less realistic simulation of network conditions and potential capacity enhancements.

Sampling and Calculations

The experiment involved several key steps. First, we randomly selected 3,000 pairs of channels from the network graph. For each pair, we calculated the minimum cut, or min-cut, a metric used in network flow theory to determine the maximum amount of flow that can pass from one node to another without exceeding the capacity of any channel in the network. 

In other words, min-cut represents the maximum possible transfer flow between the nodes, essentially identifying the weakest link in the network that limits the overall transfer capacity.

Finally, we computed the ratio between min-cut values of the original and modified network graphs to assess the impact of the added capacity.

Visualization of Results

Our experiment revealed a substantial increase in min-cut values as the network's capacity was augmented. This demonstrated a positive correlation between added capacity and enhanced transfer flow, affirming the effectiveness of the increased capacity in boosting network throughput. 

The plotted graph below shows the positive correlation between the added capacity and the maximum transfer flow:

Detailed Analysis

Upon examining the results, it is evident that as we increased the network's capacity, the min-cut values consistently rose. This finding is crucial as it highlights the direct relationship between network capacity and throughput.

The detailed data is as follows:

5,082 BTC: [1.54, 1.31, 1.17, 1.45, 1.4]
5,582 BTC: [2.05, 1.77, 1.68, 1.98, 1.87]
6,082 BTC: [2.22, 2.86, 3.5, 2.41, 1.95]
6,582 BTC: [2.58, 3.35, 2.87, 3.15, 1.3]
7,082 BTC: [3.61, 4.15, 2.78, 2.5, 3.52]
7,582 BTC: [2.61, 4.02, 2.33, 3.22, 4.52]
8,082 BTC: [5.37, 3.84, 3.52, 4.25, 3.38]
8,582 BTC: [3.86, 4.37, 4.14, 4.28, 4.86]
9,082 BTC: [4.88, 3.99, 5.82, 5.55, 6.68]
9,582 BTC: [5.58, 5.47, 4.85, 4.63, 5.83]
10,082 BTC: [6.12, 6.47, 7.55, 5.35, 5.9]

where "5,082 BTC" etc. is the simulated LN capacity in bitcoins, and "1.54" etc. is how many times the min-cut in the simulated graph is larger than the min-cut in the clean graph.

For instance, at 5,082 BTC, the min-cut value ranges from 1.17 to 1.54, while at 10,082 BTC, it ranges from 5.35 to 7.55. This progression indicates that doubling the network's capacity more than doubles the potential transfer flow, showcasing an exponential improvement rather than a linear one.

Additionally, the variability in min-cut values at each capacity level suggests that the distribution of additional capacity among nodes is also a significant factor. Channels with higher initial capacities benefited more from the incremental increases, indicating that strategic placement of additional capacity is essential for maximizing throughput.

Implications and Future Work

The results of this experiment have significant implications for the future of the Lightning Network. By demonstrating that the increased capacity of a Lightning node can substantially enhance network throughput, we pave the way for more scalable and efficient Bitcoin transactions.

Practical Applications

The results of our experiment demonstrate several key benefits for the Lightning Network's real-world performance. 

  • Scalability: Increased throughput means that the LN can handle a higher volume of transactions, making it more viable for widespread adoption.
  • Efficiency: Faster transactions reduce latency and improve the user experience, encouraging more users to adopt Bitcoin and the LN.
  • Reliability: Enhanced capacity ensures that the network can maintain performance even under heavy loads, increasing trust in the system.

Future Research Directions

While our experiment provides valuable insights, further research is needed to explore:

  • Long-term stability: Assessing how sustained increases in capacity impact network stability over time.
  • Optimal capacity distribution: Investigating the most effective ways to distribute additional capacity among nodes to maximize throughput.
  • Decentralization vs Performance: assess the impact of throughput capacity increase by adding several nodes instead of one.
  • Real-world testing: Implementing the Stroom Network node management tool in live environments to validate experimental findings and refine the tool's algorithms.

Conclusion

The experiment conclusively shows that it is possible to significantly enhance the Lightning Network's transfer throughput. By strategically adding capacity to a node, the maximum possible transfer flow between nodes is greatly improved. This enhancement is crucial for the scalability and efficiency of the Lightning Network, making Bitcoin transactions more robust and reliable.

Additionally, these findings highlight the potential of boosting the capacity of the nodes to play an essential role in driving innovation and improving the overall Lightning Network infrastructure. As we continue to refine these tools and methodologies, the future of Bitcoin and its associated technologies looks brighter than ever.

*****

We trust you've found this article helpful. To learn more about Stroom, access detailed information about our technology, or explore how you can join the ecosystem, visit the following resources:

Official website: https://stroom.network/
Whitepaper: https://stroom.network/Primer.pdf
Twitter (X): https://x.com/StroomNetwork
Discord: https://discord.gg/DZ53WjDXz9
Telegram: https://t.me/stroomnetwork

Stroom DAO
Stroom DAO