Skip to main content

This is an opinion editorial by Shinobi, a self-taught educator in the Bitcoin space and tech-oriented Bitcoin podcast host.

The Lightning Network as a payment routing network has many similarities with the internet itself. You must be connected to the network, payments are routed from one source node on the network to a destination node just like data packets on the internet and it requires an unbroken connection from the source to destination. It also has one massive difference — the requirement for liquidity. On the internet, as long as bandwidth is available (i.e., the pipes are not "clogged"), you can pass an infinite amount of information along a route as long as you have enough time to wait for it to get through. Lightning channels, however, can be depleted, as they require actually moving money from one side of a channel to another in order to route a payment, and eventually they will run out of money on one side and push all of it to the other.

This creates a necessary balancing act between the use of the network in the present to forward payments for individual users and the health of the network in the future regarding its capability of forwarding payments for other users. Each time someone routes a payment through a specific channel, they increase the likelihood that the channel they used will not be able to process payments in the same direction for other users in the future.

In essence, users attempting to adopt strategies en masse to benefit themselves in terms of guaranteeing the delivery of their payment can have negative effects on the overall liquidity distribution of the network and actually lower the likelihood of individual users' payments arriving successfully at the destination. Essentially, whatever strategy is dominantly used by end users to select routes for their payments is going to have systemic effects on the entire network. In the negative sense, — i.e., how individual behaviors have degrading effects on the system as a whole — this dynamic is known as the “price of anarchy.”

Rene Pickhardt has been engaging in a line of research to develop heuristics useful for improving the reliability of payment delivery across the Lightning Network. One strategy to achieve the goal that has come out of this research is referred to as “Pickhardt payments.” Currently the most frequently used strategy across the network is to prioritize route selection based on the lowest fee. This works rather well for small payments, but not so much for larger amounts. Intuitively, the reason should be obvious: such low fee routes are widely used which tends to push liquidity in one direction, leaving less available. The effect this has for other small payments taking the same route is small until approaching depletion, but for larger amounts, the odds of success become lower.

Pickhardt payments work by prioritizing reliability over cheapness, making educated guesses on the probability of a payment succeeding over different potential paths it could take. Just like the dominant, low-fee prioritizing strategy, over time as a node attempts to make payments and sees some fail it will update its assumptions on the probability of payment success and over time refine its accuracy. This should help prevent nodes in swarms always depleting the same channels, because their view of the network in terms of reliability will evolve uniquely over time.

An important part of path selection is considering which direction liquidity is flowing in a channel. Is it balanced both ways? Is it predominantly one direction? In his most recent research looking at the dynamic of the price of anarchy, Pickhardt noted his realization that, based on public gossip data, it may be possible to estimate the rate of drain in channels, how balanced or unbalanced the flow through it is and further improve the reliability of estimations on payment success or failure along certain routes. Estimating this correctly allows you to look at a channel and guess which direction has a high probability of completing a payment and which direction has a low probability.

Another aspect to Pickhardt payments is to optimize for both reliability and low fees. In modeling things to study the price of anarchy dynamics of the Lightning Network, it was discovered that optimizing for both reliability and fees lead to one of the worst externality costs for the network or the highest price of anarchy. This seems to create the greatest rate of channel depletions across the network out of all path selection strategies.

Now these effects don't exist in a vacuum or without counter balances. Routing nodes on the network are also actors that have tools at their disposal and can adopt strategies to optimize the flow control and counterbalance this. Routing nodes can alter fees to disincentivize pushing liquidity to one side of a channel, i.e., if most payments are flowing one direction they can charge higher fees for that and lower fees for going the other way. Nodes can open or close channels, creating new connections to meet higher demand. Nodes can also rebalance channels, pushing liquidity from one channel of theirs out into the network and back into another channel of theirs to alter the liquidity distribution in that channel. Nodes sending payments can also select and utilize different path selection strategies when they observe the current one is leading to frequent payment failures.

I'm sure people reading right now are thinking something along the lines of, "Who cares, the market will sort it out, Lightning is a market-driven system." Lightning is an almost entirely market-driven system, but it's not that simple when analyzing dynamics like the price of anarchy. Users of the network are not going to be analyzing routing algorithms manually, picking and choosing what to use with each payment; They are going to be using tools and software that automates all of this and hides it in the background. This makes this kind of research important to the overall health of the network. A way needs to be found to enable end users to engage with the network selfishly, prioritizing their own interests, without degrading the performance of the network as a whole.

Modeling how these two dynamics interact, the strategies for sending nodes and mitigation strategies for routing nodes is incredibly important for developing strategies for both classes of users to balance and optimize the overall health of the network and the reliability of payments for individual users. Routing data between different devices is a long-solved problem in computer science, which the Lightning Network builds heavily on but the dynamic of liquidity constraints adds a new facet to the entire field of research around reliably routing information.

The Lightning Network has been a huge success so far in improving the speed and scalability of payments using Bitcoin, but to continue that success at larger scales and a larger load from more users, the interaction of these two different dynamics needs to be thoroughly understood and accounted for. In order for users of the network to adopt successful strategies, those strategies must first be developed, understood and verified.

This is a guest post by Shinobi. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.