TL; DR
- The increased Ethereum usage and adoption causes network congestion, which leads to exorbitant gas fees and low throughput, especially in times of high network activities.
- A layer 2 network is a secondary blockchain built on top of a layer 1 blockchain, such as Ethereum and Bitcoin, to increase the scalability of the primary network.
- Ethereum layer 2 solutions enable scalability with faster and cheaper transaction fees for executing Ethereum transactions.
The Ethereum ecosystem has seen a surge of DeFi protocols, decentralized applications, and NFTs, among other innovations, which have rapidly increased its usage over the last few years. This sparks the concern for the underlying blockchain’s capacity to scale to match the growing adoption and usage. For the Ethereum blockchain, this rapid growth has resulted in slow execution times, network congestion, and high transaction fees, especially in times of high network activities. Solution? Layer 2 scaling protocols - secondary blockchains that process transactions off-chain.
This article explores Ethereum and its scalability issues, what layer 2 solutions are and what they are for, the types of layer 2 solutions on Ethereum, and their role in the blockchain’s future.
What is Ethereum?
At its core, Ethereum is an open-source, decentralized network that facilitates the development and deployment of smart contracts – pieces of self-executing codes or agreements– and decentralized applications (dApps). Vitalik Buterin conceptualized the Ethereum network in 2013 and officially launched it in 2015 as a proof-of-work (PoW) network. It later transitioned to a more energy-efficient proof-of-stake (PoS) consensus algorithm through one of its key upgrades known as the Merge. The Merge involved reconciling Ethereum’s Beacon Chain – the separate PoS blockchain that served as the consensus layer – with the Ethereum Mainnet.
Generally speaking, Ethereum has given rise to a plethora of use cases with its innovative smart contracts, dApps, Decentralized Autonomous Organizations (DAOs), and NFTs. The wave of innovations in the ecosystem allowed Ethereum to extend the capabilities of blockchain technology beyond financial transactions. This includes enabling developers to create applications and services on top of it. In other words, Ethereum opened new possibilities and use cases within blockchain’s technological realm.
Ethereum and Its Scalability Issues
Ethereum alone accounts for roughly 25% of developers building in the blockchain industry. The introduction of self-executing smart contracts, in particular, paved the way for dApps, which pioneered a booming DeFi economy. In return, the Ethereum network experienced a surge in network usage and adoption. The increased demand caused network congestion, which led to exorbitant gas fees and low throughput, especially in times of increased network activities.
This growing demand highlights the challenge of the blockchain trilemma. It essentially states that a blockchain architecture can only tackle two of three key aspects – decentralization, scalability, and security. In the case of Ethereum, which prioritizes decentralization and security, has posed challenges for scalability of its network.
For instance, Ethereum only processes about 15-30 transactions per second (TPS). This number is way lower than VISA’s transactions per second, which is approximately 1,700 TPS.
Understanding Layer 2 Protocols
A layer 2 network is a secondary blockchain built on top of a layer 1 blockchain, such as Ethereum and Bitcoin, to increase the scalability of the primary network. Layer 2s are often designed to decongest the base layer networks by handling most of the transactions away from the main network. In other words, layer 2s abstract transactions away from the mainnet.
Put another way, the Ethereum main chain delegates most of its tasks to the layer 2 scaling solutions, which inherit the security of the underlying blockchain. The layer 2s are typically designed to process thousands of transactions per second, resulting in high throughput and decongestion.
At its core, a layer 2 solution operates in two parts:
- The protocol to which transactions processing is delegated;
- A smart contract on the main chain.
The smart contract on the main chain is responsible for holding and releasing the digital assets sent to the secondary network. It also provides the main chain with verifiable proof from the secondary network regarding the integrity of the requested state change. Upon receiving the proof, the smart contract validates it, settles any disputes, and finalizes transactions.
Ethereum layer 2 protocols typically utilize technologies such as optimistic rollups, zero-knowledge rollups (ZK-rollups), sidechains, and validiums.
What are Ethereum Layer 2 blockchains for?
Ideally, blockchains fulfill three core functions – data availability, execution, and consensus.
- Data availability – This refers to a blockchain’s capacity to guarantee that every participant in the network can access the network’s stake, transaction data, and other data necessary to verify a block.
- Execution – Execution refers to the computations necessary to perform network state changes and confirm transactions. In short, it refers to transaction processing and throughput, measured based on the number of transactions a blockchain can process per second.
- Consensus – Blockchains use consensus to guarantee that all validators and network nodes independently reach an agreement on the network’s state, transaction ordering, and the validity of transactions. Consensus is essential in ensuring the integrity and security of the network is upheld. It is often measured in terms of decentralization and the period it takes for all the network participants to reach an agreement on a certain state change.
Ethereum layer 2 solutions are tailored to make the parent chain more efficient by increasing transaction throughput and lowering gas fees in the ecosystem.
Types of Ethereum Layer 2 Protocols
Some of the most common types of Ethereum layer 2 networks include:
Sidechains
A sidechain is an independent blockchain that is connected to the main chain via a two-way bridge and smart contracts. They employ a two-way peg mechanism, which allows assets to be locked on the main blockchain while simultaneously issuing corresponding tokens on the sidechain.
These tokens are mere representations and hold equivalent value to the original assets, but no actual asset transfer occurs between the chains. This arrangement helps to offload transaction burdens from the main chain without compromising the security of the original assets.
Blockchain Rollups
Blockchain rollups are layer 2 scaling solutions that bundle together a bunch of transactions and send the data to the base layer as a single transaction. The base layer, in return, confirms and includes the resulting transaction data in a new block. By processing transactions away from the mainnet, rollups facilitate cheaper and faster transactions while leveraging Ethereum’s security. The most common types of rollups are zero-knowledge rollups (zk-rollups) and optimistic rollups.
- Optimistic rollups – The defining feature of optimistic rollups is that the base layer operates on the assumption that all transactions are, by default, valid and accurate. The transaction’s validity is only computed when a network participant submits a fraud-proof within a specific challenge period to contest the validity of the rollup transaction.
- Zk-rollups – On the contrary, zk-rollups computes the validity of transactions and submits the validity proofs, which confirms that the bundled transactions are indeed correct and valid, to the base layer.
Channels
Channels are Ethereum’s equivalent of Bitcoin’s Lightning Network. While they facilitate transfers across networks and handle transactions off-chain, this kind of layer 2 scaling solution only submits the first and last transaction to the base layer. By handling transactions off-chain, channels help lower transaction costs and increase transaction throughput.
Plasma
Plasma blends cryptographic verification with smart contracts. It defines a framework that facilitates the implementation and creation of child chains utilizing the Ethereum mainnet as an arbitration and trust layer. Typically, the Ethereum base layer offloads its tasks to plasma chains or child chains, which regularly report back to the mainnet.
While they make fast and cheaper transactions possible, the number of transaction types they support is limited. In addition, withdrawing from the plasma chains back to the mainnet is also subject to prolonged waiting times. It also requires vigilance to ensure the security of the funds moving between the chains. Hence, users often favor rollups over plasma chains.
Validium
Another scaling solution in the Ethereum ecosystem is the Validium. It uses validity proofs like zk-rollups to maintain the integrity of transactions. Its defining feature is that it does not store the transaction data on the mainnet, which allows it to process approximately or more than 9,000 transactions per second.
Role of Layer-2 Solutions in Ethereum’s Future
Ethereum Layer 2 solutions, or L2s, are critical in transforming Ethereum into a globally accessible payment system by addressing its scalability challenges. These platforms function on the top of the Ethereum mainnet, optimizing transaction speed and reducing costs significantly. Whether users are engaging in Web3 games, trading tokens, minting NFTs, or simply trading ETH, L2s streamline these activities. They ensure that even as Ethereum's user base and transaction volume grow, the network remains efficient and accessible for a wide range of applications.
Frequently Asked Questions
How does Ethereum layer 2 work?
They operate on top of the Ethereum main chain and process transactions off-chain to provide faster and cheaper transactions.
What is the most popular Layer 2 Ethereum?
The most notable layer 2 scaling solutions on Ethereum include Polygon, Optimism, Arbitrum, Base, Ronin, and ImmutableX, among others.
What is the difference between Layer 1 and Layer 2 Ethereum?
A layer 1 blockchain is the foundational layer of the blockchain architecture. They serve as the primary and autonomous chain that directly executes and confirms transactions that can host smart contracts and decentralized applications. Layer 2 protocols, on the other hand, are secondary networks built on top of the layer 1s. They provide scalability and cost-effectiveness to the base layer.
Disclaimer:
It is highly recommended to conduct thorough research prior to making any financial decisions. Please note that this article's purpose is solely for educational purposes and the author and the organization, M2, do not influence the reader's investment or trading choices.