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 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 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.
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.