Ethereum Layer 2 Scalability
A dive into the various and unique Layer 2 solutions promising to alleviate Ethereum's scalability problems
Ethereum’s Scalability Issues:
Ethereum has scalability problems that it must mitigate in order to become the major global payment/smart contract platform. The network can handle about 15 transactions per second (tps), while traditional financial services such as Visa can process over 1,700. Slow processing times of 15 tps are not feasible as mass adoption continues. Retail investors and consumers often cannot even afford to use the network when it is in high demand due to ridiculous gas fees of over $200 per transaction.
Ethereum finds itself in a neverending dilemma where while adoption increases, so do the scaling issues and high fees. This dilemma is known as the scalability trilemma in which it must balance decentralization, scalability, and security.
To ensure decentralization and security:
Transaction speed/scalability are sacrificed as the consensus mechanism cannot be rushed.
To ensure scalability and security:
Decentralization is sacrificed by increasing node processing power requirements, leading to higher equipment costs.
To ensure decentralization and increased scalability:
Security is sacrificed as node size would need to be increased, slowing down the validation process and increasing the risk of an attack.
Part of the solution is the Ethereum 2.0 upgrade, which introduces PoS and sharding (which I’ll cover in a future article), but this isn’t enough on its own. Layer 2 solutions are vital components in answering Ethereum’s scalability issues and will be discussed further in this article.
What is a Layer 2?
The Ethereum Mainnet is the network that stores all transaction history and verifies data blocks, referred to as Layer 1. Layer 2s are protocols built on top of Layer 1 blockchains to increase speed and scalability. These Layer 2s are also known as off-chain solutions and process transactions off of the Ethereum Mainnet, reducing congestion on the main blockchain. The idea is to facilitate low fees and high transaction speeds without sacrificing the security and decentralization of the base layer.
The Major Layer 2 Types:
Rollups
State channels
Plasma
Sidechains
Rollups:
Rollups are Ethereum Mainnet smart contracts that execute transaction computation off-chain on Layer 2 while storing data on Layer 1. Rollups improve transaction speed and reduce fees by offloading work from the Mainnet while taking advantage of its security. Rollup scaling solutions can process over 1,000 transactions per second with minimal fees. The two types of rollup scaling solutions are Optimistic Rollups and Zero-Knowledge Rollups (ZK-Rollups).
Optimistic Rollups:
Transaction data is sent off-chain as calldata
Transactions are not computed by optimistic rollups, they are “optimistic” in that they assume the transactions are legitimate (fraud proofs are employed as a contingency)
Aggregators validate transactions on Layer 2 and send the transaction history and state root back to Layer 1 as a rollup block (the minimal amount of transaction data required)
Anyone can be an aggregator and process transactions on Layer 2, receiving rewards for doing so
Aggregators must stake funds that will be slashed if they do not accurately report transaction data
In the case of a state root being reported as fraudulent, the reporting party challenges the aggregator and fraud proofs are employed to ensure validity
If fraudulent calldata is identified, the Layer 2 blockchain rolls back while the offending aggregator has funds slashed, rewarding the reporting party
Pros:
Complex smart contract and regular transaction functionality
Secured by Layer 1
Increase network speed by 10-100X
Network fees are significantly reduced
Cons:
Long withdrawal periods of 7-14 days
Security issues:
Assumes there are honest validators who will submit fraud proofs and execute transactions
Optimistic Rollup Examples:
Arbitrum
Optimism
Boba
Metis
Fuel
OMGX
Cartesi
Zero-Knowledge Rollups:
ZK-Rollup systems use transactors and relayers
Transactors create transactions and send them to Layer 2
The receiving and sending addresses, transaction value, network fee and a unique number (nonce) are saved
The data is saved in two Merkle Trees, addresses in one, with transaction amounts in the other
Relayers take this data and create a rollup block
ZK-Rollups validate transaction data and generate validity proofs that are sent back to Layer 1
These proofs are known as the succinct non-interactive argument of knowledge proofs (SNARK)
SNARK only requires validity proofs and leaves out unnecessary transaction data, hence the name zero-knowledge
Pros:
Faster than optimistic rollups (instantly verified once sent to Layer 1)
More secure than optimistic rollups (assumption is guilty until proven innocent)
Decentralized as data is stored on Layer 1 (only necessary information stored on Layer 2)
Cons:
Not as compatible with complex smart contracts as Optimistic Rollups (facilitates mainly simpler transactions)
ZK-Rollup Examples:
Loopring
Polygon
Aztec 2.0
Starkware
zkSync
zkTube
State Channels
State channels use multisig contracts (requiring multiple signatures) to open up channels for users to transact off-chain.
Users lock up some ETH in a smart contract and sign a transaction on Layer 1
This opens up a channel in Layer 2 where multiple transactions can occur off-chain
Each transaction has an identifying nonce, resulting in chronologically stored data
When the transactions are complete, the channel is closed by sending a transaction to Layer 1
The multisig contract sends the funds decided off-chain in the channel once verified on the Mainnet
Pros:
Greatly decreases demand on Layer 1
Reduces fees significantly (only pay for the open and close transactions)
Preserves user privacy (transactions are only transparent to channel participants)
Transactions are confirmed instantly as Ethereum Mainnet rules are adhered to
Cons:
May not be worth the cost and effort required to set up a channel unless executing multiple transactions
Lockup of funds in payment channels
No open participation support
Plasma
Plasma is a framework of blockchains anchored to the Ethereum Mainnet who operate independently. The structure is put together in tree formation, where smaller plasma chains (child chains) are created on top of the main blockchain.
More child chains can be built on top of each child chain, resulting in a tree-like structure
Merkle trees and smart contracts are utilized in building this structure, resulting in the possibility of unlimited plasma chains
Plasma chains are smart contracts that execute a specific task in order to facilitate different and unique transactions
Work is carried out on these child chains, thus decongesting the Ethereum Mainnet
Fraud proofs enable communication between child chains and the root chain
Plasma chains implement unique consensus mechanisms to validate blocks with their individual and unique fraud proofs
These fraud proofs secure the network and allow users to report fraudulent nodes to the root chain
The root chain is responsible for securing the network and punishing bad actors
Pros:
High speed of transactions
Low user fees
Decongests Ethereum Mainnet
Cons:
Long withdrawal periods of 7-14 days
Centralized entity manages off-chain components
Sidechains
Sidechains are separate blockchains that run parallel to the Ethereum Mainnet, connected by a two-way bridge, and validating transactions using independent consensus mechanisms.
Sidechains run the Ethereum Virtual Machine, essentially a copy of the Ethereum Mainnet
Interoperable as dApps work seamlessly on sidechains
Acts identically to the Ethereum Mainnet
Each sidechain runs its unique consensus mechanisms to ensure security and validation
Funds are locked on one side of the Ethereum-sidechain bridge and minted on the other
Transactions take place using the minted funds, reducing fees and increasing network speed
When the user is finished transacting on the sidechain, the minted funds are burned and Mainnet funds are unlocked
Pros:
Low fees
Fast transaction speeds
Interoperable and familiar (runs EVM)
Cons:
Not secured by Layer 1 (independent consensus mechanism)
Not as decentralized as Ethereum Mainnet
Greater security risks
Concluding Statement:
All Layer 2 solutions come with their benefits and drawbacks, some will become obsolete with time, but many will play a large role in the future scalability of Ethereum. The most likely scenario is one in which multiple Layer 2 solutions are employed for unique purposes, serving where they are best suited. One thing is certain, the upcoming Ethereum 2.0 upgrade when combined with Layer 2 solutions will make for a much more user-friendly, convenient, and financially feasible experience in the future.

