The Scalability Issue
Bitcoin has faced a number of challenges over the years but perhaps the biggest challenge has been scalability. This is because of the block size limit of Bitcoin blocks. The blocks, formed every 10 minutes, are like a page in a ledger that records all the transactions during that period of time. Satoshi Nakamoto set a 1 megabyte (MB) block size limit when he created the Bitcoin network in 2009, but this has since been increased to maximum size of approximately 2 MB (although the exact figure varies depending on the types of transactions included in the block). Even with the increase in block size the Bitcoin network is limited to approximately 7 transactions per second (TPS). For comparison, Visa currently processes around 4,000 TPS – so you can see why that presents a problem when Bitcoin maximalists are claiming it will be the future of money.
In 2017, when Bitcoin transactions approached network limitations, two solutions to scale the network were being discussed:
1. Off-chain scaling
2. Increasing the block size
The debate around which solution was the best option led to a civil war within the Bitcoin community.
The group that wanted to take the off-chain scaling route were opposed to changing the underlying protocol of the Bitcoin network. Instead they opted to tackle the issue of scalability through the addition of a second layer. In July 2017 a software upgrade was locked in which would activate Segregated Witness. Segwit was required to enable second layer solutions on Bitcoin such as the Lightning Network.
The group that wanted an increase in block size began development of Bitcoin Cash in retaliation. This was released in August 2017 through a hard fork, increasing the block size to 8 MB. This also created a new blockchain separate from the original blockchain. The majority of miners decided to stay on the original Bitcoin blockchain and therefore Bitcoin Cash did not see the success it had envisioned.
The Lightning Network
The Lightning Network adds another layer to the Bitcoin blockchain which allows users to settle transactions off chain. The transaction fees on the Lightning Network are much lower and the transactions are settled almost instantly.
Its easiest to explain how the Lightning Network operates with the use of an example. Let’s say Danny buys a coffee from Chris everyday on his way to work. They want to be able to transact quickly and with minimal fees using Bitcoin so they set up a payment channel on the Lightning Network.
Firstly, they need to create a multisignature wallet. This is a wallet that they both have access to with their respective private keys and requires both private keys to complete a transaction. They both deposit 1 BTC each into the wallet which will act as a collective balance between them.
If Danny buys a coffee from Chris at 0.005 BTC they both need to use their private keys to update the balance sheet. However, if one person doesn’t sign for the transaction the funds will not be moved. After the transaction has been signed for Danny will have 0.995 BTC and Chris will receive the 0.005 BTC bringing his balance to a total of 1.005 BTC. They can continue transacting like this until one persons balance reaches 0 BTC. The payment channel can then be closed which will broadcast the final transaction to the Bitcoin blockchain. The only transaction fees incurred on the Bitcoin blockchain will be from opening and closing the payment channel.
This network can be used for transactions even if a direct payment channel doesn’t exist. For example, Jane is a friend of Danny who also buys coffee from Chris. If Jane wanted to make a payment to Danny she wouldn’t need to open up a new payment channel. Instead, the transaction could be sent through her channel to Chris and then sent from Chris to Danny. As more people use the Lightning Network, more of these connections are made. The Lightning Network will find the shortest route for your transaction to take so as to minimise the fees.
Problems of the Lightning Network
The Lightning Network isn’t perfect and faces issues of its own. The main problem with the network is a lack of decentralisation. As the network grows so does the centralisation of nodes. This is depicted in the figure below taken from a paper published in the New Journal of Physics.
The figure clearly shows the centralisation of these core nodes depicted in blue. This centralisation appears to be an unavoidable consequence of the way the Lightning Network is designed. The longer the route a transaction takes, the more fees the user will have to pay and therefore the network finds the shortest path. There is also an incentive for nodes to become as central as possible to maximise the transaction fees they can earn. These factors combined end up forming the star-like structures around central nodes. This centralisation makes the network more vulnerable as an attack on one of these centralised nodes can spell disaster for the surrounding network.
There is also an issue surrounding liquidity on the Lightning Network. The amount you have locked into your payment channel is the maximum you can transact with. So if you have 1 BTC in your channel you wont be able to send anything over that amount. In addition to this, a transaction is further limited by the maximum capacity of the route it takes to the recipient. If we use the example of Danny, Chris and Jane from earlier to better explain this. Danny and Chris have a direct payment channel. Jane and Chris also have a direct channel but Danny and Jane don’t have a direct channel. If Danny wants to send 5 BTC to Jane but his channel with Chris has a capacity of 1 BTC in it then it is not possible to send 5 BTC to Jane. This can have a limiting effect on the funds that can be sent through Lightning Network channels.
There are a few other issues that are a lot more technical and are covered well in an article on CoinDesk which I’ll link below.
The Lightning Network is a step in the right direction. I think off-chain scaling is the correct route to take when approaching the problem of scalability. However, there are many problems that need addressed before it can be adopted on a wider scale. The centralisation and security issues that arise from trying to scale the network better highlight blockchain trilemma. The blockchain trilemma is a concept that Vitalik Buterin, co-founder of Ethereum, coined. It proposes that blockchain developers are forced to sacrifice one aspect of the triangle for the sake of the other two.
Further reading on vulnerabilities