Lightning Labs is a private company developing Bitcoin’s Lightning network. The company’s CEO, Elizabeth Stark, recently announced the release of the Lightning network on Bitcoin’s mainnet and a modest round of funding (by cryptocurrency standards) of $2.5 million from high profile Silicon Valley executives hailing from companies like Square (Jacqueline Reses and Jack Dorsey), Twitter (Jack Dorsey), RobinhoodApp (Vlad Tenev), and Paypal (David Sacks).
The release of the Lightning network beta on Bitcoin’s mainnet was met by much hype and fanfare. This was something promised to Bitcoin’s community for several years now and it’s finally becoming tangible. With the recent blockchain congestion that brought Bitcoin’s network to its knees with super high fees and long block times, as well as the creation of the Bitcoin Cash community that vehemently opposed Bitcoin’s refusal to increase block sizes to relieve congestion, the hint of an imminent release of a viable offchain scaling solution for Bitcoin was highly welcomed.
But is the Lightning network as great as many claim it is? The idea is very ambitious but the devil is in the details. There is a significant problem that the network has not solved. Without a solution, the Lightning network cannot become decentralized.
What exactly is the Lightning network?
But first, what exactly is the Lightning network? It’s a second-layer technology on Bitcoin focused on scaling through state channels. Bitcoin’s community has been stubborn in keeping the 1mb maximum block size that was arbitrarily set by Satoshi Nakamoto in the early days of Bitcoin development. The community believed that raising the block size will reduce decentralization since full nodes will require more space which will be more expensive to setup and maintain. As such, any attempts at raising the block size will start a slippery slope to increasing centralization. As we all know, the archenemy to Bitcoin is centralization.
This arbitrary block size limit has proved to be insufficient for how popular Bitcoin has become today, with blocks filling to the max with transactions and the mempool clogging up with hundreds of thousands of pending transactions.
Instead of raising the maximum block size to accomodate more transactions, Bitcoin’s community has decided that the best way to scale Bitcoin is with offchain protocols like the Lightning network. Theoretically, the network allows for trustless, secure, and decentralized payments to be conducted over Bitcoin’s network without publishing a transaction in a block. As such, regardless of Bitcoin’s maximum block size, users will be able to quickly transact over Bitcoin without having to pay outrageous fees or wait an outrageously long time.
The Lightning network uses a relatively new blockchain technology known as state channels to support offchain transactions. Let’s say Alice, a user that wishes to participate in the network, needs to setup a “payment channel” with another user, Bob, on the Lightning network. To do so, Alice needs to publish a transaction in a block committing some of her bitcoins to the channel with Bob. Bob can also publish a transaction to commit his own bitcoins to the channel. It’s important to note that bitcoins committed to a channel cannot be spent on the blockchain until the channel is closed.
At this point, a channel is set up between Alice and Bob with a total of A + B bitcoins. Alice has A bitcoins in the channel and Bob has B bitcoins. X = A + B.
With the magic of cryptography, Alice and Bob can securely send each other Bitcoin over the channel an infinite amount of times without ever touching the blockchain.
What’s even more awesome is that if Bob has a seperate payment channel with Charlie, then Alice and Charlie can send bitcoins to each other through Bob without have to setup their own channel.
Taking this a little further, imagine the Lightning network had many users and many channels. Theoretically, a user can send funds to any other user on the network as long as there is a path of channels connecting them. This effectively creates a Internet of money over Bitcoin that could scale to an unlimited number of transactions per second.
The Elephant In The Room
In order for the Lightning network to work, it needs to be able to route payments from one part of the network to another. Just like the Internet, a user theoretically only needs to maintain one connection (payment channel) to interact with the rest of the network. If a user had to constantly setup channels with other users, than there is no point in using the Lightning network at all since s/he could simply pay via onchain transactions.
The only problem is, there is no known efficient solution for decentralized routing. For example, if Alice was separated from Fiona by 5 connections, and Alice wanted to send a payment to Fiona, there is no easy way for the Lightning network to quickly finding a suitable path. In fact, the network really has no way of knowing if there even exists a viable path without having to try all possible paths! Even the Internet, a decades-old technology, has not solved this problem! Internet routing is done via centrally managed routing tables by ISPs.
In fact, the Lightning network’s routing problem is even more complex than the Internet’s. To send a payment, not only does the network need to find a viable route, the connections in between need to have enough liquidity to support the payment. For example, if Alice wanted to send Fiona 1 bitcoin, and the network miraculously found a path from Alice to Bob to Charlie to David to Ellen to fiona, if any of the channels, Alice-Bob, Bob-Charlie, Charlie-David, David-Ellen, and Ellen-Fiona, didn’t have at least 1 bitcoin of liquidity, Alice cannot use this path to send 1 bitcoin to Fiona.
Put simply, this “liquidity routing” problem is a daunting problem to solve, and one that definitely warrants more discussion.
One might counter by saying that this might not be a problem at all if we kept network topology simple, e.g. having large, highly liquid nodes that everyone connected to so that participants in the network are no more than 2 degrees of separation from each other. Then you realize that this is a highly centralized solution that defeats the whole point of using Bitcoin.
The Lightning network is currently released as a beta on the mainnet, but if developers cannot solve this “liquidity routing” problem, it might forever be stuck in beta.
The Lightning network needs to be decentralized
I am incredibly excited that the Lightning network has finally been deployed on the mainnet. However, the reality is that the network is far from being a viable decentralized payment network. There are a multitude of unanswered questions, some small and some large, that plague the network. The largest of all, in my opinion, is the liquidity routing problem. Without solving this problem, the Lightning network is doomed to become a centralized payment protocol.