Crypto network infrastructures must demonstrate their ability to balance the Blockchain Trilemma: decentralization, security, and scalability. Of the three, blockchain scalability (improved throughput) remains the dominant design concern for existing and emerging platforms.¹ Blockchain developers have two main routes of implementation to resolve scalability issues: Layer 1 (L1) and Layer 2 (L2) scaling solutions. Layer 1 and Layer 2 blockchain scaling solutions are mutually beneficial innovations designed to optimize network performance.

While a Layer 1 scaling solution is an innovation to the underlying parent network protocol, a Layer 2 scaling solution is built “on top” of the parent network protocol, which integrates with the parent protocol to improve network performance.

WHY LAYER 2 BLOCKCHAIN SCALABILITY MATTERS

Layer 2 scalability is measured by the solution’s ability to support a high volume of transactions for both the L2 and its parent network.² As blockchain technology achieves widespread adoption, validator nodes struggle to efficiently verify increasingly complex, data-dense transactions. It takes time for the parent network’s decentralized blockchain validators to reach consensus on the integrity of pending transactions. Nevertheless, an L1 consensus mechanism–like Ethereum’s Proof of Stake–is a critical component of network security. This unsustainable ‘throughput pressure’ necessitates L2 scaling solutions designed to reduce network gas fees and improve transaction finalization speeds.

Effective Layer 2 solutions are expected to resolve these concerns by processing data off of the L1 parent blockchain while taking advantage of the base layer’s decentralized security model. By shifting the processing onus onto the L2 system, L2 scaling solutions are able to reallocate the bulk of the parent network protocol’s processing burden to off-chain networks, allowing the 'parent' chain to focus on security without sacrificing scalability.³

LAYER 2 OFF-CHAIN SOLUTIONS

There are numerous existing and emerging off-chain L2 scaling frameworks. The four categories attracting the most development fall into four categories: state channels, sidechains, Plasma, and rollups.

STATE CHANNELS

State channels are regarded as one of the first meaningful L2 scaling solutions. Bypassing the need to consistently mine every unique transaction, state channels facilitate smart contracting via a private, two-way channel that expedites on- and off-chain communication. State channels do not require Layer 1 node validation–only the ‘opening’ and ‘closing’ steps of the transaction are recorded on the underlying blockchain. Participants can potentially transact an infinite number of times with minimal to no fees and near-instant processing speeds.⁴ As data is processed off-chain, some degree of decentralization is sacrificed to achieve this impressive scalability. Balancing efficiency with decentralization is the principal design challenge for state channel developers.

Bitcoin Lightning’s payment protocol and Ethereum’s Raiden Network are examples of L2 state channels. Of the two, Lightning remains the best example of a successfully implemented state channel scaling protocol. The payment channel is predominantly used to facilitate micropayments and cross-border remittances. Despite continual development, Ethereum’s early L2 Raiden Network is not yet ready for widespread adoption.

SIDECHAINS

Sidechains are independent blockchains operating in parallel with the Ethereum base layer or an EVM (Ethereum Virtual Machine) compatible blockchain. They aid parent chains by processing large batch transactions and absorbing base layer congestion. The parent layer is then free to focus on maintaining network security and resolving transaction disputes. Unlike state channels, sidechain transactions are publicly recorded to the base layer ledger. Sidechains are also not strictly regarded as a Layer 2 scaling solution due to their ability to deploy their own consensus mechanism and security protocols⁵ A benefit of this L2 scaling solution is that security breaches do not compromise the parent chain when a sidechain is hacked.

PLASMA AND THE EMERGENCE OF ROLLUPS

In 2017, Ethereum creator Vitalik Buterin conceived the framework for one of the first Layer 2 scaling solutions not built on state channels or sidechains: Plasma. The resulting ‘OMG Foundation’ protocol debuted as a true Layer 2 Plasma scaling solution.⁶

Built atop Ethereum or an EVM-compatible blockchain, this method creates a centralized value-of-transfer layer. Transactions are efficiently bundled, compressed, and rapidly validated via an anchored ‘child’ chain. The ‘parent’ chain defines the parameters between itself and any number of attached ‘child’ chains. Interwoven child chains handle network functions delegated by parent chains and return to the parent after completing tasks. Dispute resolution is handled on the parent chains.

Akin to sidechains, the redistribution of work off-chain reduces the processing burden on the underlying blockchain to exponentially improve scalability. Unlike sidechains, Plasma child chains are non-custodial and, thus, reliant upon the parent chain for network security and finalization. It is worth noting that users’ funds remain on the parent chain even if a nested Plasma chain goes offline. After years of data availability limitations and an inability to support smart contracts, developers have largely transitioned from Plasma in favor of an L2 scaling solution built upon Plasma's base mechanism–rollups.⁷

ROLLUPS

Rollup technology is a popular L2 solution that supersedes Plasma technology's design and data limitations. Secured by L1, rollup solutions summarize, compress, and execute transactions off-chain. Essential details are periodically packed into blocks and directed back to the base layer in order to validate and post transaction data on L1. Unlike Plasma, rollups support Layer 1 smart contracts and these contracts can be programmed to enforce the execution of transactions on Layer 2. By staking a bond in the rollup contract, ‘operators’ are incentivized to verify and execute transactions.

Rollup technology is mainly defined by two types of rollups with differing security models: Zero-knowledge rollups (ZK-rollups) and Optimistic rollups.

ZK-rollups execute compressed transaction batches off-chain and secure them via a cryptographic proof known as SNARK (succinct non-interactive argument of knowledge). The rollup is then returned to the base layer with a ‘proof of validity’. Block validation is quicker and cheaper as only essential data is included within a validity proof. ZK-rollups thus ‘pay’ the cost of validation upfront. With essential details stored on the base layer, transactions remain secure and decentralized.

Optimistic rollups, like Arbitrum, also execute transactions off-chain. However, these rollups delay the cost of validation and increase the number of possible transactions by assuming transactions are valid by default. Operators submit ‘notarized’ rollups to the mainnet. If an operator suspects fraud, the rollup will execute a ‘fraud proof’ and run the transaction’s computation. Vigilant operators are rewarded for proving fraud while bad actors are penalized via money slashing. Because Optimistic rollups circumnavigate the expensive and time-consuming computation process, this L2 solution offers up to 10-100x improvements in transaction-dependent scalability.⁸

SCALING CHALLENGES AND SOLVING THE BLOCKCHAIN TRILEMMA

Each L2 scaling framework varies in its ability to balance decentralization, security, and scalability. Developers are working to innovate and implement combinations of Layer 1 and Layer 2 scaling protocols designed to balance the Blockchain Trilemma. Ingenious L1 and L2 scaling protocols are essential to the health and viability of an emerging Web3 capable of rivaling the success of its predecessor.

 

Sources:
1. “Scaling overview,” Ethereum.org, last accessed November 28, 2021, https://ethereum.org/en/developers/docs/scaling/.
2. “Layer 2 Rollups” Ethereum.org, last accessed December 20, 2021, https://ethereum.org/en/developers/docs/scaling/layer-2-rollups/.
3. “Blockchain Layer 1 vs. Layer 2: Things You Must Know” Bybit, September 8, 2021, https://learn.bybit.com/blockchain/blockchain-layer-1-vs-layer-2/ 
4. Charles Yu & Alex Thorn, “In Search of Scaling: A Guide to Layer 2,” GalaxyDigital.io, last accessed December 20, 2021, https://docsend.com/view/cvivn2th9fbhsfje.
5. Ashley H., “Crack The ‘Impossible Triangle’: Overview of Layer 2 Solutions,” Gate.io, December 3 2021, https://www.gate.io/blog_detail/372/crack-the-impossible-triangle-overview-of-layer-2-solutions.
6. “What Is OMG Foundation and How Does It Work?,” Gemini, last accessed December 20 2021, https://www.gemini.com/cryptopedia/what-is-omg-network.
7. Kelvin Fichter, “Whatever happened to nested plasma chains?,” Medium, November 30, 2018, https://medium.com/@kelvinfichter/whatever-happened-to-nested-plasma-chains-ee9d66d33536.
8. “Layer 2 Rollups,” Ethereum.org, last accessed December 21, 2021, https://ethereum.org/en/developers/docs/scaling/layer-2-rollups/.