What is Layer 2?
How it works
Layer 2 solutions like rollups bundle many off-chain transactions into a single batch, compute a cryptographic proof (validity proof for ZK-rollups or fraud proof for optimistic rollups), and submit that proof plus compressed data to the Ethereum mainnet. This allows the main chain to verify the entire batch in one step, dramatically increasing throughput. Real implementations include Arbitrum and Optimism (optimistic) and zkSync and StarkNet (ZK-rollups). These rollups use sequencers to order transactions and may employ committees for data availability. Users can exit back to L1 by submitting a withdrawal proof, ensuring funds remain safe.
State channels, such as the Lightning Network for Bitcoin and Raiden Network for Ethereum, allow participants to conduct many off-chain transactions by locking a multisig on the main chain. The channel is opened with a funding transaction, then participants exchange signed state updates off-chain. When they want to close, the latest state is submitted to the L1, which enforces the final balances. Disputes are resolved by a challenge window. This enables instant, low-cost payments, but requires both parties to be online and cooperate. State channels are ideal for frequent interactions between known counterparts, like streaming payments.
Why it matters
Layer 2 is critical for blockchain adoption because it solves the scalability trilemma, allowing decentralized networks to handle mass adoption without sacrificing security or decentralization. By moving execution off-chain, it reduces congestion and gas fees, making dApps accessible to more users. It also enables new use cases like microtransactions and real-time gaming that were previously impractical. Without Layer 2, blockchains like Ethereum would be limited to roughly 15 transactions per second, whereas rollups can achieve thousands, paving the way for global-scale decentralized applications.
Real-world examples
Prominent Layer 2 examples include Arbitrum and Optimism (optimistic rollups on Ethereum), zkSync and StarkNet (ZK-rollups), the Lightning Network (state channels on Bitcoin), and Plasma chains like Polygon (formerly Matic). These protocols have facilitated billions of dollars in transactions, with projects migrating to L2s for cheaper, faster interactions. The rise of rollup-centric roadmaps has made L2s a core part of Ethereum scaling.
FAQ
What is the difference between Layer 1 and Layer 2?
Layer 1 is the base blockchain (e.g., Ethereum) that provides security and consensus. Layer 2 is a secondary protocol built on top that handles transactions off-chain, using Layer 1 for final settlement.
How do Layer 2 solutions maintain security?
Layer 2 solutions inherit security from the underlying Layer 1 by submitting cryptographic proofs or transaction data to the main chain, ensuring that state transitions are valid and funds cannot be stolen.
What are the main types of Layer 2?
The main types are rollups (optimistic and zero-knowledge), state channels, plasma, and validiums. Each has different trade-offs regarding speed, security, and data availability.
Related terms
Go deeper
Browse the complete crypto glossary to explore related terms and concepts.
Browse Glossary