The Lightning Network for Dummies
The Lightning Network was designed to allow for smaller Bitcoin transactions to be carried, potentially solving the problem of transaction scalability.
Bitcoin came around as an alternative for the world’s financial and monetary system after the 2008 financial crisis. Since then it has experienced increased adoption over the past few years thanks to the 2017 rise in price to just under 20,000 USD. Its legitimacy as money is still a matter of debate. Just search “Is Bitcoin Money?” and you’ll find hundreds of articles like these contesting its credentials as money. Broadly, crypto proponents agree that it is money. However, whether it can actually be a substitute for a monetary and financial system depends on its scalability, which is still a matter of concern for its proponents. This is where the Lightning Network – LN – comes in. The merits of this network have been criticized, but before we get into that maybe through another post, here is how the LN works.
Lightning Network is All About Transaction Volume
For Bitcoin to be a viable alternative to the financial system it must be able to process the transactions carried out on a daily basis for big and small purchases alike. As a benchmark, VISA processes 24,000 transactions per second – tps – on its network, while Bitcoin averages at about 7 tps. To put that into perspective, the Bitcoin network needs to process about 3,400 tps more to start competing with VISA’s volume. Given the computing power, energy consumption, and costs incurred by miners to process transactions and ensure consensus on the blockchain, that is not possible today.
An Example of Bitcoin Scalability Issues
Given that Bitcoin’s use as a currency started with pizzas, it seems appropriate to talk about in this post. In the US, approximately 3,000,000,000 pizzas are consumed annually. That is about 95 tps. If people paid for every pizza order in the US with Bitcoin, it would already be 13.5 times over the 7 tps capability. Now say I want to buy a pizza slice, which today would cost about 0.0004 BTC. I may have to pay a fee of 0.00004 BTC on top of that, based on current transaction averages. That is almost 10%!
Enter the Lightning Network
The Lightning Network was designed to allow for smaller transactions or micropayments to be carried out on separate channels which only register on the blockchain once one of the parties decides to settle the payments. In this case my pizza place and I would open a multi-sig wallet (a wallet that requires both our private keys to sign on the transactions that take place). I place 0.004 BTC into it and the pizza place places 0 because it does not process refunds. This initial transaction is broadcast on to the network. During the week, I purchase 5 slices of pizza, and each time I do, I transfer 0.0004 BTC to my pizza place, and we both sign on these transactions. At the end of the week, the wallet will have registered five transactions with five balances:
Action | Where It Happen | My Balance | Pizzeria’s Balance |
---|---|---|---|
Open Channel | On Blockchain | 0.004 | 0 |
Buy Pizza Slice | On Wallet | 0.0036 | 0.0004 |
Buy Pizza Slice | On Wallet | 0.0032 | 0.0008 |
Buy Pizza Slice | On Wallet | 0.0028 | 0.0012 |
Buy Pizza Slice | On Wallet | 0.0024 | 0.0016 |
Buy Pizza Slice | On Wallet | 0.002 | 0.002 |
Unilateral Settlement | On Blockchain | 0.002 | 0.002 |
At the end of the week, if I no longer want to buy pizza here or the pizzeria wishes to collect their earnings, either of us can settle the balance in the wallet, close the channel, and record the transaction on the blockchain. Because each transaction required both signatures, we can be sure that both parties agreed to the transaction. And because only the last balance sheet is interpreted as valid when closing the channel, the final balance will be recorded on the Bitcoin blockchain correctly. Finally, because either the pizzeria or I can settle the balance unilaterally, there is no risk of either party holding the funds on the wallet hostage.
How Does this Help?
Those Lightning Network channels described above can be opened using cryptography that requires computing power available in regular computers. In the case above the Bitcoin blockchain only had to process 2 transactions instead of 5, reducing the load on the network. Additionally, because these transactions do not require massive amounts of computing power, they do not need to be processed by miners and would result in lower fees. Finally, due to the way that the lightning network is being deployed, not everyone needs to establish peer-to-peer channels. For example, if you want to buy a pizza from my pizzeria and we have a channel between us, the transaction can happen from you to me to the pizzeria with no need for you to open a new channel to the pizzeria.
Lightning Network Provides Hope to Bitcoin Maximalists
Though this is a very basic explanation of the Lightning Network, it is easy to see why there is so much hope that it could solve Bitcoin’s scalability challenge. There are currently three beta tests happening simultaneously in different programming languages, however they can speak to each other (meaning if they work, there is no need to recode). The Lightning Network may also allow for interoperability of different tokens and Blockchains, reshaping the need for exchanges and offering the path to further adoption of different cryptocurrencies.