The whole idea of blockchain is to be decentralized, secure and scalable. Example of Layer-1 blockchain includes Bitcoin, Ethereum and Litecoin. Whenever there is a transaction of these cryptocurrencies, there are a lot of steps to go through in order to achieve decentralization and security.
This takes a significant amount of processing power and time, years ago when it was not as trendy and as popular, the issues were not as obvious, but as more and more people are diving into cryptocurrency by the day, this became a problem.
To put things in perspective, in the context of blockchains, there is a term called “Transactions Per Second (TPS)”. This refers to the number of transactions that a network is capable of processing each second. Although it varies at times, the approximate average TPS of the Bitcoin blockchain is roughly about 5. Ethereum, in contrast, can handle approximately double that amount.
However, Centralized databases such as VISA, for example, handle about 1500 to 2000 transactions each second, and according to VISA, in theory, it can handle as many as 56000 transactions per second. This is where layer-2 comes into play.
Layer-2 refers to a secondary framework or protocol that is built on top of an existing blockchain system. The main goal of layer-2 blockchain is to resolve the TPS issue and scaling difficulties that are being faced by the big cryptocurrency networks. One blockchain can have multiple layer-2 solutions. For example, Bitcoin’s layer-2 solution is the Bitcoin Lightning Network and Ethereum has Ethereum Plasma and Ethereum Raiden Network.
Although there are different approaches to creating a layer-2 blockchain, the general idea is to create a secondary framework where the transactions and processes can take place independently of their main chain. This is why some may refer to layer-2 as “off-chain” solutions.
The main advantage of having a layer-2 solution is that the main chain doesn’t need to go through any structural changes, as layer-2 is an extra layer. This means that the network security of the main chain is not compromised. It remains decentralized, fraud-proof, borderless and censorship-resistant.
Different approaches of Layer-2
There are two main approaches to creating a layer-2 blockchain architecture. State channels and nested blockchains.
A state channel is a two-way communication channel. The participants can directly interact with each other without submitting anything to the miners. When the transaction is completed, the final state of the channel is added to the main chain.
For example, Bitcoin Lightning Network allows participants to do a large number of transactions in a limited time period and the Ethereum Raiden lets participants run smart contracts through their channel.
This approach uses the main chain as the ground rules of this system, there will then be multiple levels of blockchains sitting on top of the main chain. The main chain delegates work amongst the multiple levels of blockchains and once the work is executed, these actions are sent back to the main chain. In other words, a great chunk of work that would be performed by the main chain can be moved to the second layer, so while the main chain provides the ground rules such as security, the second layer offers higher TPS, being able to perform much higher TPS than the main chain.
One example of this approach is Ethereum Plasma. This solution significantly reduces the load on the main chain but maintains the core protocols.
What about the future?
We know that layer-2 blockchains improve the performance and usability of layer-1 blockchains. But is that enough? There are still some drawbacks to adding layers of structures to an existing framework. Mainly because the big-name cryptocurrency has grown to have multi-billion dollar market caps and millions of dollars are traded every single day using these coins and adding extra codes and complications to experiment with these existing protocols is not always full proof.
We know that layer-2 is more efficient and effective but with the growing demand by the day, it is still nowhere close to having widespread mainstream adoption of cryptocurrency. Scalability is precisely one of the biggest issues why it is still not used on day-to-day transactions.
To make sure that cryptocurrencies are scalable and fast enough for day-to-day transactions, we need protocols that have been built specifically to solve this problem. Many new digital currencies have attempted to create or revise their blockchain protocols in order to accommodate these issues, but the level of success varies. In the future, one of the most important developments paving the way for blockchain technology going forward will likely have to do with scalability.