Publisher avatar
6 min read

What is Layer 2 and how does it work?

What is Layer 2 and how does it work?

What is Layer 2 and how does it work? 

A major topic discussed these days in the world of crypto is a type of cryptocurrency or blockchain network called Layer 2. Most of the newer projects active in the space also use the term a lot, either as a way of distinguishing themselves from conventional cryptocurrencies like Bitcoin and Ether, or to signify that they are not, in fact, primary blockchain networks themselves.

In this article, we explore:

  • A brief history of the term Layer 2 in crypto
  • The differences between Layer 1 and Layer 2 blockchains
  • Some examples of Layer 2 frameworks
  • Crypto that use Layer 2

A brief history of the term “Layer 2”

A perceived longstanding issue of cryptocurrency has been its ability to settle transactions quickly. This happened especially with Bitcoin, which, by design, has a roughly ten-minute period before a transaction can be confirmed as part of security measures.

While most services accept the mere transmission of a transaction as payment, many continue to wait for a minimum single confirmation to ensure the payment is settled.

As Bitcoin and Ethereum became more popular, network congestion also became an issue, as these networks’ ability to process transactions lagged. Simply put, the speed of transactions weren’t ideal for commerce.

Remember how the technology that once amazed us now seems like a thing of the past? For example, many years ago, having 16 gigabytes of storage on your smartphone was considered an incredible amount. Technology is constantly developing and adapting to current market demands, and it is the same for blockchain technology and many of the world’s most familiar cryptocurrencies.

In the early years, blockchain-based crypto was capable of handling traffic on their network. A single Bitcoin block could hold an average of 2,000 transactions while Ethereum many times more. Few people expected that these crypto would be so popular that Bitcoin’s transaction speed of roughly 7 per second wouldn’t be enough but as utility grew exponentially, it became clear that this was too slow for a world on the brink of crypto adoption.

Suddenly, the original blockchains of mature crypto like Bitcoin and Ethereum were considered to have slow processing times and, as a result, high fees (since you could pay higher fees to prioritise your transaction in a long queue). 

Traits such as slow processing times and high fees are not particularly welcome in any relevant market and in the light of acquiring a broader customer base. We use the word scaling to describe the processing of transactions on the blockchain rapidly and with low fees.

Scalability was important to resolve fundamental problems that troubled many blockchain networks such as Bitcoin, yet the challenge was to balance scalability with a high degree of security, while remaining decentralised. This is often referred to as the “blockchain trilemma”, namely the ability to successfully balance three organic properties that constitute blockchain’s core principles of decentralisation, scalability and security.

Bitcoin is the best example to illustrate the trilemma. According to Vitalik Buterin, a co-founder of Ethereum, blockchain technology can only offer two out of three properties at once. For example, Bitcoin can successfully manage to achieve security and decentralisation, at the cost of a desired level of scalability.

To mitigate clogging and losing customers, developers decided to create secondary blockchains that work in conjunction with the main blockchain. They referred to this as the Layer 2 protocol.

Layer 2 is defined as a separate blockchain built with the purpose to extend the functionalities and abilities of existing blockchain platforms in the crypto ecosystem, specifically to bring scalability to a higher level.

Layer 2 is built on top of existing blockchains that are referred to as Layer 1.

Differences between Layer 1 and Layer 2 in cryptocurrency

To understand Layer 2, we have to go back to basics and define Layer 1. The term Layer 1 was, in fact, a retroactive term created because of the need to define Layer 2. It was frequently used to describe Bitcoin and Ethereum.

In this sense, Layer 1 refers to the basic main blockchain framework, namely to the network’s foundational protocol or in other words, to a number of solutions tailored for boosting the design of base protocols. Subtle improvements in the base protocol introduced by Layer 1 solutions help in obtaining a higher degree of scalability in the light of the entire ecosystem.

A number of pre-eminent entries within Layer 1 blockchain solutions show how such options can offer divergent approaches for scaling, such as increasing block size over the base protocol, sharding and modification in consensus mechanisms. In simple terms, Layer 1 scaling solutions can offer greater capacity for accommodating additional users and data. Some of the most common examples of Layer 1 blockchain networks today are Bitcoin, Ethereum, Binance Smart Chan, Litecoin, and Avalanche.  

Hence, we have Layer 1 as the underlying main blockchain architecture and on top of that lies Layer 2 as the overlaying network.

For example, Bitcoin is a Layer 1 network, whereas the Lightning Network is a Layer 2 network on top of Bitcoin.

To learn more about the Lightning Network as a solution to Bitcoin’s scaling limitations, read this Learn Crypto article: “Lightning Network: the future of money”.

Therefore, Layer 1 encompasses a number of upper hands such as decentralisation, security, and the enhancement of ecosystem development in terms of incorporating novel tools, technological innovations, and other similar variables into the base protocols. On the other hand, the inability of Layer 1 networks to scale is a common issue. For instance, the consensus mechanism used by Bitcoin, also known as Proof-of-Work, requires a significant amount of computational resources. 

As described already, Layer 2 blockchain solution works on the native layer to efficiently offload transactions by transferring a portion of Layer 1 blockchain’s transactions to another system architecture. 

The burdening load for processing is handled by Layer 2 that reports to Layer 1 for result finalisation. Thereby, network clogging is reduced and more scalable. Back to the Bitcoin Lightning Network best practice example; the Lightning Network speeds up the Bitcoin blockchain’s processing, and additionally integrates smart contracts into the Bitcoin blockchain. In other words, the main advantages of Layer 2 networks comes down to extending the functionalities and abilities of their Layer 1 counterparts by increasing programmability and performance, while reducing transaction fees.

What are Layer 2 frameworks?

Layer 2 frameworks can be defined as scaling solutions created to enable protocols to build applications and carry out transactions with lower fees and more speed. Layer 2 scaling solutions can be classified into four categories: sidechains, rollups, plasma, and channels.

The main idea behind every Layer 2 framework is to allow several parties to safely interact in a particular manner without issuing transactions on the main chain, namely Layer 1. At the same time, it should still be able to manage the security of the main chain to some extent. Before explaining each framework separately in the list below, it is interesting to point out that, while sidechains have their own security properties, other mentioned scaling frameworks generally rely on the mainchain’s security.

1. Sidechains

The fundamental idea behind a plain sidechain is to have an entirely separate blockchain with its own operators and validators, along with bridges to transfer assets. Therefore, sidechains are considered quite complex frameworks due to having their own validators, consensus algorithms such as proof-of-stake or proof-of-work. In other words, once they are established, sidechains can be difficult to change.  

Sidechains can be illustrated as smaller blockchains that function separately, yet still alongside the mainchain to add to the main chain’s efficiency and overall functionality. Having their own infrastructure, they remain separate from the main blockchain and are thereby capable of ensuring its security.

2. Roll Ups

A Roll Up is practically a sidechain, taking into account it can produce blocks and snapshots such blocks to the mainchain. Think about a parallel chain, rather than a second layer. Such a Layer 2 scaling framework rolls up a group of transactions and feeds it back into the main blockchain.  

There are two types of Roll Ups: 

  • Zero-Knowledge (ZK) Roll Ups: ZK Roll Ups use validity proofs where transactions are computed off-chain. The compressed data is then being supplied to the Ethereum Mainnet as a proof of validity. Since they work by combining many actions a user would want to do on the blockchain into one simple chain, they are considered as very efficient and rapid. Their main drawback is the inability to use smart contracts. 
  • Optimistic Roll Ups: Optimistic Roll Ups are referred to as ‘optimistic’ in the context that transactions are considered to be valid generally, but can be challenged if necessary. Such Roll Ups can use smart contracts, yet they are slower and less efficient than ZK Roll Ups. 

3. Plasma

Plasma can be defined as a Layer 2 scaling framework that enables non-custodial sidechains. Referred to as the most confusing of all Layer 2 scaling solutions, Plasma creates a series of childchains as secondary chains that assist the main blockchain with verifications. The childchains are connected to the main blockchain by smart contracts, referred to as root contracts, that basically enable the mainchain to guide the childchains. Main Plasma childchains are also able to have their own childchains to achieve a higher degree of security. 

Plasma’s advantages are linked to the Plasma chain being secured by the mainchain. In comparison to sidechains, the Plasma chains leverage the security of the main chain, and if an attack occurs, plasma chain users can move to the main blockchain. Therefore, this scaling solution provides a higher degree of security. However, its main disadvantage is linked to a long waiting period for users who would like to withdraw assets from Layer 2 to transfer them to Layer 1.

4. Channels

This scaling solution allows the establishment of a peer-to-peer channel between two parties that can exchange an unlimited amount of transactions on Layer 2 while only submitting two transactions to Layer 1.

The first transaction opens up the link between Layer 1 and Layer 2, and the secondary transaction closes that link. Since most transactions are being taken out from Layer 1, channels enhance transaction speed, reduce fees, delays, and congestion on the network. 

The most popular types of channels are payment channels and state channels. The difference lies in the fact that payment channels are focused on payments, while state channels deal with general updates. Even though channels are very simple to work with and advanced in terms of achieving speed, they are not able to utilise smart contracts or virtual machine code. 

Which cryptocurrencies use Layer 2?

Multi-chain solutions, commonly referred to as Layer 2, have become very popular recently due to their high returns and low prices. Here is a list of some popular Layer 2 frameworks, either Bitcoin or Ethereum-based.

1. Bitcoin Lightning Network 

The above-mentioned Lightning Network is one of the most familiar Layer 2 solutions for Bitcoin. As its name suggests, this framework provides lightning-fast transactions on the Bitcoin blockchain. When referring to rapid transactions, we are talking about milliseconds. For the sake of comparison, the current Bitcoin average transaction time amounts to approximately 10 minutes.  

Similar to other Layer 2 frameworks, it takes transaction bundles from the main chain to be dealt with off-chain before transferring such information back, along with bringing smart contracts to Bitcoin. Overall, the Lightning Network provides a number of benefits such as reduced fees, scalability, and cross-blockchain swapping.

2. Polygon

The Layer 2 solution for Ethereum leverages divergent technologies to improve Ethereum’s scalability. Polygon’s system is designed to resolve usability and scalability-related issues and congestion on the Ethereum network, along with leveraging the Plasma framework and a decentralised network of proof-of-stake validators. 

Due to relying on proof-of-stake validators, Polygon became one of the fastest scaling solutions on the market, along with their price-wise policy that secured its place among top-performing digital assets.

3. Arbitrum

As another Ethereum-based Layer 2 solution, Arbitrum has gained popularity in a short time since its emergence in 2021. The framework in question uses Ethereum’s main chain to verify transactions, amounting to a bit higher gas fees in comparison to Polygon, but still crucially lower than on the Ethereum network. 

The main advantages are linked to having its own Arbitrum Virtual Machine boosting the scalability and transaction speed of smart contracts, making it the ideal scaling solution for DeFi (decentralised finance) applications. Arbitrum’s main drawback is related to the fact that it is secured by Ethereum or in other words that it mirrors the network’s decentralisation with a larger total value locked (TVL) pool, amounting to it becoming a not really suitable option for investors who prefer to withdraw crypto assets in a timely manner.

4. Loopring

Loopring is an Ethereum-based, audited, open-sourced, and non-custodial protocol that enables low-cost trading and transactions. Due to its zero-knowledge (ZK) protocol, Loopring gained popularity within the DeFi user base as it allowed them to simply trade, provide liquidity, and rapid transactions while not putting security at risk.

What is Layer 2 in Ethereum?

The majority of Layer 2 solutions in development are Ethereum-based, and three of the examples used in this article are Ethereum-based Layer 2. This likely because of Ethereum’s dominance in decentralised app use and Web3, which are expected to grow in the coming years.

Ethereum upgraded to Proof-of-Stake in late 2022, increasing its transaction speed manyfold. However, the years leading up to that upgrade saw many Layer 2 solutions attempt to overcome scalability issues.

Layer 2 solutions that are built on the Ethereum network require no modifications to Layer 1. Layer 2 solutions leverage the security of Layer’s 1 consensus mechanism, along with crucially speeding up transactions. For example, ETH’s Layer 1 network was capable of dealing with approximately 15 transactions per second, while Layer 2 solutions brought it up to around 4,000 transactions per second.


Why do we need Layer 2 in Ethereum?  

The new version of Ethereum is expected to be able to process roughly 100,000 transactions per second in the future. So why do we still need Layer 2?

Simply put: 100,000 transactions per second may not be enough in a future where Web3 is mainstream and crypto adoption is even more widespread than today.

Layer 2 scaling solutions within the Ethereum network are now considered a fundamental tool kit for resolving network performance issues and network congestion. There are a bunch of scaling solutions that are being researched that share a common goal: to achieve a high degree of scalability.  

Scalability’s main strategy within the Ethereum network refers to the increase of transaction speed and decrease of fees to ensure stability within the DeFi ecosystem. On the other hand, scalability solutions should not compromise decentralisation and security. We need Layer 2 in Ethereum to minimise the overall network congestion, along with avoiding the occurrence of single points of failure.  

One of the good things about the emergence of Layer 2 scalability solutions is that these solutions can coexist, and altogether influence exponentially future transaction speed, fees, and throughput. 

Layer 2 innovations have started to take place with intense competition in the crypto market. Most of these solutions are in their final stages, while others have already been present in the crypto environment for a while. 

Blockhain’s Layer 2 innovation provides many great benefits to the supported networks and their users and should continue to play an important role in providing scalability within the Ethereum and Bitcoin network over the next few years, leaving Layer 1 as a settlement layer. 

We talked about multiple scaling solutions that can be used and coexist together. Hence, sidechains, roll ups, channels, plasma and overall Layer 2 solutions in a larger sense are methods of approaching the problem of blockchain-related scalability within a sustainable and long-term oriented strategy.

Taking into account we are talking about a continually evolving technology, most Web3 infrastructural segments have yet to achieve the so-called inflection point in the market where it is definitely known which approach best suits particular needs. Layer 2 removes the obstacles of network congestion and decreased transaction speed.