2021-11-11

Layer-2: Solutions to Blockchain Trilemma


If you have read plenty of articles in blockchain technology, or researched blockchain projects on your own, you probably have come across few terms such as layer-1 and layer-2. In this article, we will discuss these two terms.

Scalability problem

 

One big problem in the current cryptocurrency and blockchain technology is the scaling problem. In fact, scalability is one of the three elements in the blockchain trilemma as coined by Ethereum’s founder, Vitalik Buterin. The other two are security and decentralisation.

Scalability is one of the most important problems that needed to be addressed if blockchain technology were to be used as a mainstream technology in the future. Since we currently are connected globally, many transactions that occurs today are through the internet. Therefore, blockchain at the minimum, should be able to handle transaction across continents.

However, there are other issues such as the amount and the speed of transaction. Transactions that occur today such as through Visa, happens at a rate of more than 10 thousand transactions per second. In comparison, Bitcoin typically handles around 5 transactions per second while Ethereumhandles around 13 transactions per second. In addition, the gas fees for the transaction across Ethereum network is very expensive and can reach as high as $100. Such scalability problem can deter this technology from being used in the future. Therefore, solutions to the scalability problem are the need of the hour.

Layer-1

 

Layer-1 simply means the underlying main blockchain network. Some examples are Bitcoin, Ethereum, Solana, Cardano and Ripple. The scalability problems that we have today is on the layer-1 network.

Layer-2

 

Layer-2 are the networks that are built on top of the existing layer-1. Layer-1 can exist on its own without needing layer-2, but layer-2 need layer-1 to work properly. Examples of layer-2 are Polygon, Cartesi and Celer.

layer-2

 

Layer-1 solutions

 

Since layer-1 is the underlying network, the solutions involving layer-1 will change the network itself. Certain layer-1 network are established and have hundreds of thousands of users. Therefore, any changes to the network will affect all users within the network. Such changes are difficult to perform since it would require a consensus within the network to agree upon those changes. Nevertheless, there are some solutions on the layer-1. Of them are the alteration of consensus mechanisms, and sharding.

Consensus Mechanism

 

Two of the highest market cap networks are Bitcoin and Ethereum. Both use the proof of work consensus protocol which is known to be very slow and expensive. To solve the scalability problem, Ethereum network have proposed to switch the consensus protocol from proof of work to proof of stake, as proof of stake is much more economical and faster.

Sharding

 

Since major cryptocurrency network such as Ethereum faces massive congestion on the network, one of the ways to reduce this problem is called sharding. Sharding reduces the congestion by splitting the database into new chains called shards. These shards can be processed in parallel, thus increasing the number of transactions per second.

Layer-2 Solutions

 

Layer-2 solutions involve introducing another networks or protocols built on top of the existing layer-1 network. These solutions provide more flexibility towards the scalability problem since any alterations does not affect the underlying main network. There are many layer-2 solutions including the nested blockchains, state channels and sidechains. These are just 3 examples out of many more methods that have existed today. For this article, we will only discuss these three.

Nested blockchains

 

Nested blockchains are blockchains that exist on top of the existing blockchain. These blockchains are connected to the main blockchain by the parent-child connection. Essentially, the parent chain distributes work to the child chains to execute the work. Once all the works are done, the child chains return the completed works to the parent chain. Nested blockchains provide ways to reduce transaction time and increase scalability exponentially since theoretically, an infinite amount of child chains can be created.

State channels

 

State channels are easier to understand. State channels are two-way communications between participants without any connections to the main blockchain network. State channels are created through multi-signature or smart contracts that have been agreed between the participants. Once all transactions have been done, the final state of the channels is then transferred to the main blockchain network to be recorded.

sidechain
Sidechains

 

Sidechains

 

Sidechains are blockchains with their own security protocol and consensus mechanisms. However, they are connected to the main blockchain network to transfer assets between them. The advantage of sidechains is that they allow large transactions to be recorded into them, and then transfer those records into the main blockchains. Thus, this improves scalability on the main blockchain.

Conclusion

 

Blockchain technology are still in its infancy, but great minds out there are working to improve it. With the current rigorous developments in solving the scalability problems, the next revolution in many of our industries are just waiting around the corner.