Bitcoin lightning network
Scaling Bitcoin is perhaps the most debated topic in the cryptocurrency ecosystem. In order for a cryptocurrency to work as a currency, it must be able to provide fast, cheap and seamless transactions for its users.
At the moment, Bitcoin’s capacity to handle transactions is terribly limited. Currently the Bitcoin network can only handle around 7 transactions per second. By comparison the Visa credit card network is able to process 24,000 transactions per second. The solution to solving the limitation in the number of transactions which can be processed by the network has been a lengthly debate. For over two years, there has been passionate discussion amongst developers on how to build out the Bitcoin network to meet the increasing number of users who wish to use the platform.
In the Bitcoin ecosystem, all transactions that are submitted to the Bitcoin network are vetted by independent computers known as miners. Once a transaction has been validated, it gets included into what is known as a “block” along with other transactions which are also processed. Approximately every ten minutes, a new block is “closed” such that transactions are grouped into blocks which are cryptographically tied to the previous block, creating the Blockchain.
The issue of the transaction limit arises because each transaction requires data space, and each block has a maximum capacity of one megabyte. As Bitcoin continues to become more and more accepted as a payment method, the ability of the network to scale to meet the demand is a very pressing issue.
When the Bitcoin network is flooded with an excessive number of transactions, the one megabyte block becomes full, and transactions are pushed off into future blocks. In order to avoid this, Bitcoin users are able to boost their transaction fee to jump the processing queue of their transactions, pushing back transactions with normal fees to future blocks. This bottleneck creates a slow, unreliable and expensive user experience.
Bigger block size
One solution to this issue is to simply increase the block size from one megabyte to whatever size is required in order to process the rising volume of transaction demand. This is what the current Bitcoin Cash (BCH) hard fork of Bitcoin has implemented. The Bitcoin Cash block size currently stands at 32 megabytes, and the developers have signalled that they will keep increasing the block size to meet future demand on their network.
However, it’s argued by Bitcoin developers that increasing the block size is a temporary fix to an unending issue, and have compared it to increasing the lanes on a highway which inevitably only leads to more traffic and future congestion. Increasing the block size also makes the network exponentially harder to secure because the attack surface continually grows in size. Furthermore, verifying bigger blocks requires larger and larger data centres, leading to fears of network centralisation.
Off chain solution
Therefore Bitcoin (BTC) has taken a different approach to scaling its network. Rather than increasing the block size, the Bitcoin developers are working to optimise the use of the limited one megabyte block size. Their solution is to take transactions “off chain” and use second layer solutions to confirm transactions, then utilising the Bitcoin Blockchain as the final settlement layer.
The Bitcoin Lightning Network is a second layer solution which is currently being developed on top of the Bitcoin Blockchain. In simple terms, the network will allow a series of transactions to occur off chain, and then eventually settle on the Blockchain such that each “on chain” transaction will have millions, if not billions of transactions within it.
The Lightning Network works by users creating what are known as payment channels which enable users to send Bitcoin to each other. These channels allow two parties to send multiple payments to each other, with each individual transaction not hitting the Blockchain until the channel is closed. Taking a step further, users can reach other users through channels as well.
Bitcoin lightning network example
For example, if Alice has a channel open with Bob, and Bob has a channel with Charlie, and Charlie has a channel with Doug, then Alice is able to send Doug funds through Bob and Charlie. The Lightning Network will allow funds to “net out”, meaning that if Alice owes Bob $10, Bob owes Charlie $10, and Charlie owes Alice $10, the network will net out these balances through a series of transactions in lightning speed.
Lightning will also allow users to send micro payments, for example to a broadcaster for every second of video that they watch. Instead of sending sixty payments to the Blockchain for watching a minute of video, only two transactions will register (opening and closing the channel) on the Blockchain after the user has finished watching a video.
In short the Lightning Network allows two parties to open a channel for multiple payments, and the payments that are made through that channel will not hit the Blockchain until the channel is closed. This is significant, as arguably unimportant Bitcoin transactions for cups of coffee and other small purchases will no longer require the immense computational power required by the Bitcoin network. If all goes to plan, as the Lightning Network rolls out and is implemented alongside the Bitcoin network, it will create a fast, cheap and reliable solution for scaling Bitcoin.