Whenever you hear of bitcoin as a way of payments, it is likely that you’ve constantly come across the term called lightning network. Today, we will be taking a look at what the bitcoin lightning network is, how it works and how it solve bitcoin’s scalability problems.
Bitcoin whitepaper from Satoshi titled bitcoin as a “Peer to Peer electronic cash system” that would enhance the transactions made by individuals. As we all know, Bitcoin was initially set up to be a payment system that would have transactions stored on the blockchain and not rely on any third parties. However, somewhere along the way, we started facing a particular problem that directly affected the initial motive behind Bitcoin’s creation. That problem that everyone keeps talking about and has held developers worldwide looking for alternatives has been bitcoin’s scalability problem.
The most significant disadvantage of Bitcoin at its base later is that it only has limited ability to handle a limited number of payments. This is due to constraints in the block size and time taken to generate the next block (block size is set at 1 Megabyte, and the time it takes to create a new block is around 10 minutes), creating a low throughput network.
Due to these issues, Bitcoin can only do 7 transactions per second, which is largely inferior to the likes of Mastercard and Visa that can complete 5000 and 1700 transactions per second, respectively. Thus, scalability is a considerable disadvantage bitcoin has to other traditional payment services and vastly limits the application in terms of payments.
Additionally, these transactions do cost a lot of money as there is a race to get everyone’s transactions on the 1MB block size. For instance, mean transaction fees during regular periods are around $3–4 while it can reach anywhere from $ 40 to $60 in network congestions, as we saw during April this year. This is inefficient, mainly if you would like to make small transactions in the system. There have been many solutions to these scalability problems involving creating forks like Litecoin, but one such efficient answer to this problem has been the lightning network.
Lightning Network is an off-chain layer 2 application that works on top of the bitcoin blockchain itself and acts as the transaction layer. The lightning network was ideated in 2015, went live in 2018 and has been used extensively since then to scale bitcoins transactions. When using the lightning network, the transactions are cheaper, faster (reasoning behind the lightning name) and more efficient than on the base layer on-chain.
This is done by creating payment channels between individuals that can facilitate Bitcoin transfer from one person to another. Unlike Bitcoin, these transactions are not stored in the blockchain and are only updated when parties open and close a particular payment channel.
How does it work?
Consider that you would like to make a payment to a vendor using Bitcoin. Let this be your neighborhood coffee shop where you get your daily caffeine fix. In traditional settings where someone uses bitcoin to pay, it would be too expensive and take at least 10 minutes for the transaction to go through. By doing this, you would end up possible be spending more on the transaction than the coffee itself, and by the time the vendor confirms your transaction, the coffee might have turned cold.
Now suppose you would like to start using the lightning network for the payments. All you need to have is some bitcoin balance in the lightning network, and you would be able to open up a payments channel with the coffee shop vendor. Once the payments channel is opened up, you can pay the vendor instantly with extremely low fees, and there is a balance sheet created with the balances of both yourself and the vendor. This payment channel can last forever and can be terminated at any point whenever any of the parties wish to settle all the transactions. Once the channel is closed, the balances are verified on the bitcoin blockchain.
A more interesting feature of this lightning network is that it is built for global adoption. For example, suppose your friend Alice wants to have a coffee at the same place you have a payments channel at. She does not need to create a separate payments channel but could connect via your channel with the vendor and pay through that as long she has a payment channel with you.
Why is the lightening network so important?
If you have been following crypto news so far, you would have read that many institutions and organisations have started accepting bitcoin as a means of payments. The most bullish news for bitcoin this year has been the acceptance of bitcoin as a legal tender by El Salvador and couple of other Latin American countries. With so many more existing payment acceptors and more to come, it is difficult to imagine doing transactions on the base bitcoin layer. The lightning network brings Santoshi’s vision of bitcoin being a payment system a reality and allows more efficient daily transactions.