I wanted to create a practical and easy-to-understand breakdown of how lightning is capable of handling millions of transactions per second, how nodes connect to make this scale possible, and some recent examples of payment success growth over the last 4 years.
The Lightning network is a peer-to-peer (P2P) payment system that allows anyone globally to take part in it. Unlike traditional payment networks which are centralized, Lightning allows anyone to join and add value and resiliency to the network functionality which enables instant settlement payments.
How the Lightning network operates
The Lightning network operates similarly to Bitcoin and is made up of nodes. Lightning nodes are connected together by channels that allow payments to be executed.
Lightning payment channels are bidirectional. This means that both sides of the channel can send and receive payments to each other.
In the above scenario, this involves only two peers, the lightning network has tens of thousands of peers. Where the infinite scalability possibilities come from is when more peers join the network and become connected with more liquidity. As long as there is a balance on the side of the channel a payment is coming from, there is a chance that payment can route through and be fulfilled.
While there will be new engineering problems that surface that need to be addressed as Lightning scales, new nodes and liquidity are essential to scale to handle global payments infrastructure.
Lightning node connectivity example
In October of 2021, Arcane Research shared data breaking down how connected the Lightning Network was at that time by connecting a new node to one well-connected LNBIG.com-node. This node had direct channels with 281 other nodes. (This is the equivalent of 2% of public nodes with channels)
If you started a new node in October of 2021 and connected to LNBIG.com-node you could reach:
- 43% of nodes by two hops
- 93% of nodes by 3 hops
- 98.8% of nodes by 4 hops
- 99.9% of nodes after 5 hops
This example paints the picture of what role routing hubs play in the success of connectivity across the Lightning Network. By removing the top 10 nodes connectivity falls to around 85% connected.
Where the Lightning network can become a truly infinite scalable solution for payments is when we see more nodes and bitcoin capacity added to the network. The gif shown above illustrates how Bob and Alice send payments back and forth with each other. At scale the Lightning network would have millions of peers, all routing payments at the same time.
The P2P nature of lightning enables payments to flow through the necessary peers in order to reach their destination. When millions of payments are flowing and multiple payments through the same channel in tandem, that is where problems may arise, and engineering solutions will be in place to prioritize payments for the highest success rate.
Lightning network payment success example
In October of 2022 River released a Lightning Report and on page 16 they disclose their payment success rate in September of 2022 was 98.7%. River sends thousands of transactions a day and they had an avg transaction size of 230k satoshis (~$46) and a median transaction size of 24.4k sats (~$5).
866 of the 1467 payments were unable to route as a result of timeouts, and 558 as a result of there being no route available at the moment. Other, less frequent causes of payments failing included node server outages (1 instance), erroneous payment information being provided (14 instances), or an inadequate amount being available because liquidity was lost between the time a node calculated a route and the payment was delivered (28 occurrences).
Data from 2018 showcases that $5 transactions were failing ~48% of the time.
Within 4 years we have seen massive improvements in the average transaction value as well as the success rate.
This truly begs the question to be asked. Can we expect Bitcoin and Lightning network to follow the adoption curves that we have seen for other technologies?
Is the Lightning network being adopted?
The earlier insights I shared in this piece clearly prove the network is improving in terms of connectivity and payment success.
The next step is continuing this growth but at a faster rate. Willy Woo posted a Bitcoin user growth chart in October 2022 which paints a picture of how growth can move gradually and then rapidly.
This paints a picture of what we have seen time and time again throughout history. Technologies start with a slow and steady adoption and then a massive wave of growth happens from 1 million to 100 million. Time will tell how long it takes for Bitcoin to reach 1 billion users.
The illustration below shows that technologies that were created pre-internet took longer for mass adoption. What the internet has introduced is a faster capability for network effects to take place. (See the internet, mobile phone, and PC)
These newer innovations that require the internet have more rapid adoption curves. Bitcoin and the Lightning Network both benefit from this same innovation curve.
What is interesting is that a Bitcoin or Lightning wallet can be created or downloaded on a mobile phone or a PC. This makes Bitcoin and Lightning networks accessible to 63% of the world as of October 2022. The data below shows we are also adding 170+ million new users to the internet yearly.
How many transactions can Lightning handle?
The lightning network theoretically is capable of scaling to do million + of transactions per second. I see a few things that can be addressed to help enable this even more quickly.
What must be considered and solved to reduce failed payments can be extracted from River’s report shared earlier? While 98.7% were successful, 1.3% of payments that failed were due to the below reasons.
- 59.03% – fail due to timeout
- 38.03% – fail due to no route available
If we want millions or near-infinite payments we need to solve for timeouts and no routes being available. (Remember, this is one of the top nodes in the entire network, while all nodes are not operating at this level, it paints a picture of what the lightning network can deliver in terms of successful payments when a node is managed well at these very early stages)
At Voltage, we are creating a solution, Surge, which helps node runners find these problems quickly so that higher reliability can be achieved. Tools like Surge will help the Lightning Network achieve incredible reliability by empowering individual node runners with better data.
As new node operators come online in the future they will have better data and tools to more quickly help reach a 99%+ success rate for payments. With tools such as automation and machine learning, nodes will be able to begin making better decisions on where and how to route payments.
While the lightning network may not be processing infinite payments at this moment, it has the capability to reach millions of transactions per second. With more connectivity, liquidity and tools which will enable better decision-making, we will likely see incredible throughput of payments.
As new engineering solutions like splicing, and tools like Surge should play a role to create better experiences reliability will increase. Naturally, new problems will arise and they will be solved.
EDIT: 11/1/2022 (post publishing) – Just this morning an LND exploit went down. This is another example of how engineering problems must be solved along the way. While many exploits are done on test net, some will happen on mainnet and when those problems arise, solutions must be implemented.
We are still in Lightning’s infancy. May we continue to identity and improve the experience of the network as a whole.
If you have feedback or thoughts, please share them with me on Twitter at @ibobbyshell.