Skip to content
Home » Web3 Glossary » What is Layer 2?

What is Layer 2?

layer2 meaning crypto glossary article cover

Ever heard of two different types of liquid that flow side-by-side but never meet? Layer 1 (L1) and Layer 2 (L2) kinda work like the metaphor. 

L2 is a secondary framework that is based and built on the top of an L1 blockchain that increases the efficiency and decreases the workload (read: transactions) of the main blockchains. 

Alternatively known as L2, they are independent blockchains that work in conjunction with the leading blockchains or main networks such as Ethereum, Bitcoin, etc. 

Polygon and Immutable X are examples of the layer.

Importance of L2 blockchains

You would have read and heard users often refer to main L1 blockchains as on-chain. Similarly, L2 chains work on an off-chain mechanism. Their importance can be gauged by the value they add to L1 chains. 

They are an extension of main blockchain networks and they assist them in increasing their overall scalability and more importantly, the average TPS (transactions per second) rate. As of today, the main or L1 blockchains can only verify and process a limited number of transactions a second. With time and overall growth in their user base, this has turned out to be a great challenge. 

Thus, L2 blockchains work as a reliable technology solution that takes the surplus and unprocessed transactions and processes them off-chain with more efficiency and less time. 

L2 does not only help the main blockchain in increasing its TPS but also works independently while being connected to the main network. This has a huge impact on the main network’s performance and consequently, the entire experience of a user operating on the main blockchain.

Layer 2 increases the performance for L1 to make a better user experience and improve overall performance. On the other hand, Layer 1 has some different solutions like changing the consensus mechanism from Proof of Work to Proof of Stake (which has already been done as part of the Ethereum Merge) and sharding.

Features of Layer 2 chains

Apart from increasing the scalability of the main blockchain, there are multiple other features of L2 technology. Some of the major ones are as follows:

1. Rapid transactions

As was discussed previously, without L2 technology, main blockchains may take a lot of time in processing and may face many challenges as well, ruining user experience and the overall credibility of the network. With L2, this problem is properly addressed.

2. Reduced transaction fee

Transaction fees are a non-negligible parameter in blockchain transactions. With the main network, the transaction fee tends to be more. However, Layer 2 solutions can reduce the fees and give similar output.

3. Smart contracts 

You may know that Ethereum, as a main blockchain, is quite famous for dApps and smart contracts. L2 technology enhances this capability of Ethereum and other main blockchains by catering to much more complex cases of smart contracts.

4. Interoperability 

While some types of L2 may not be interoperable, some of them can support different block parameters and different consensus mechanisms as well. This interoperability makes the technology more desirable and investment-worthy. 

Different types of L2 networks

The concept of blockchains was introduced in 2018 with the development of Lightning Network in bitcoin. Since then we have seen the technology evolve and grow bigger. There are several different types of L2 networks today. If we were to divide them, we would get four distinct categories. 

1. Channels

The most basic principle of channels is that they enable peer-to-peer (P2P) channeling between two parties off-chain. Channels are further divided into two – state channels and payment channels. 

a. State channels

A type of off-chain solution that allows for a number of transactions to be conducted between two parties with no such requirement of it being registered on the main blockchain while the transactions are taking place. This eliminates the waiting time as we are no longer dependent on third parties like a miner.

b. Payment channels

As the name suggests, it is a type of off-chain solution that only caters to off-chain payments between two parties.

Differences between state and payment channels 

State channelsPayment channels
Support more than just payment and transactions such as smart contracts May not necessarily cater to complex execution as smart contracts 
Do not require every transaction to be recorded on the main blockchain before the final transaction is processedTracking of payment, amounts, and balances is an important part and parcel of the channels 
Involves the creation of a temporary off-chain stateInvolves the creation of a temporary off-chain state
Faster and cheaper transactionsFaster and chapter payments
Complex compared to payment channels and may require attention to detail in order to be maintainedSimpler compared to state channels and can be easily maintained

2. Rollups

Rollups are in the form of smart contracts created on the Ethereum blockchain and they serve as the bridge between L2 and mainchain. 

How rollups work is that the transactions that are initiated on the mainchain are eventually executed in the layer 2 blockchain. 

Once a bunch of transactions has been processed and verified, they are shifted to the main chain in a block and thus they become a part of the main blockchain. 

A common type of rollups – zero knowledge rollups – combine layer 2 off-chain transactions and send them to the main chain. This method provides security to the main network with a less resource-intensive rollup.

3. Plasma 

A plasma chain is a subsidiary of the Ethereum network and is connected to Ethereum Mainnet. It was introduced by the co-founder of Ethereum, Vitalik Buterin along with Joseph Poon to scale the Ethereum network. 

Plasma chains are interoperable and are created using smart contracts and Merkle trees. It is majorly used to increase the TPS rate of the main blockchains that it is associated with. What makes it stand apart is that it can conveniently be used by any L1 blockchain using any consensus mechanism.

4. Sidechains 

A sidechain is again a subsidiary of Ethereum and it works as a layer 2 solution for the main blockchain. Sidechains, albeit connected to the main network, can have a consensus mechanism and block parameters which can be very much different from the main blockchain.

Sidechains are generally seen attached to the main blockchain via a two-way peg and Polygon is a great example of a network based on sidechains.

Final words

There is no doubt that L2 blockchains have given a lot of room to L1 blockchains to bring about new features and upgrade the on-chain mechanism while not having to worry about the transaction load. 

Let’s not only do payments on Layer 2 but build smart contracts on it because that’s actual scalability.  

Sandeep Nailwal, Founder of Polygon on his plans about the scalability

Experts believe that the interoperability of L2 networks may prove to be very beneficial to the overall user experience and that the said networks have the capability to be expanded to different arenas within the blockchain. This means that layer 2 DeFi, trading, and DEX can substitute centralized finance in power, capacity, and efficiency.  

Layer 2 blockchain technology can open the door to multitudes of avenues for developers to tap into and revolutionize. However, they would need to be careful when it comes to layer 2 security and flexibility, two great features that make blockchain technology stand apart.