Layer 2
Scaling solutions that process transactions off-chain while inheriting base layer security
What is Layer 2?
Layer 2 (L2) refers to protocols built on top of a base blockchain (Layer 1) that handle transactions off the main chain while ultimately relying on L1 for security. By moving execution off-chain while posting proofs or data to L1, Layer 2s achieve higher throughput and lower costs without sacrificing the security guarantees of the underlying blockchain.
The term encompasses various technologies—rollups, state channels, plasma, and validiums—each with different trade-offs between security, decentralization, and performance.
Why Layer 2?
The Blockchain Trilemma
Blockchains struggle to simultaneously achieve:
- Scalability: High transaction throughput
- Security: Resistance to attacks
- Decentralization: Many independent validators
Layer 2 offers a solution: keep L1 secure and decentralized, scale execution elsewhere.
Layer 1 Limitations
Base layer constraints:
- Block space is scarce and expensive
- Every node processes every transaction
- Throughput fundamentally limited
- High demand = high fees
Layer 2 Solution
Off-chain execution:
- Process transactions on L2
- Batch and compress for L1
- Inherit L1 security through proofs
- Users get lower fees, faster transactions
Types of Layer 2
Rollups
Currently dominant L2 technology:
- Execute transactions off-chain
- Post transaction data to L1
- Two main types: optimistic and ZK
- Full L1 security inheritance
- Assume transactions valid
- Challenge period for fraud proofs
- Used by Arbitrum, Optimism, Base
- Generate validity proofs
- Instant finality once proven
- Used by zkSync, StarkNet, Scroll
State Channels
Peer-to-peer scaling:
- Participants open channel on-chain
- Transact off-chain between themselves
- Close channel, settle on L1
- Best for repeated interactions
- Used by Lightning Network (Bitcoin)
Plasma
Older L2 technology:
- Child chains with own consensus
- Exit proofs to L1
- Data availability challenges
- Largely superseded by rollups
Validiums
Rollup variant:
- Validity proofs like ZK rollups
- Data stored off-chain
- Lower fees, weaker guarantees
- Used for gaming, specific applications
How Rollups Work
Execution
- Users submit transactions to L2 sequencer
- Sequencer orders and executes transactions
- New L2 state computed
- Transaction batch compressed
Data Posting
- Compressed data posted to L1
- L1 stores data in calldata or blobs
- Anyone can reconstruct L2 state
- Data availability ensured
Security
For optimistic rollups:
- Anyone can submit fraud proof if invalid
- Challenge period (usually 7 days)
- Malicious sequencer loses bond
For ZK rollups:
- Validity proof submitted with batch
- L1 verifies proof cryptographically
- Invalid batches rejected immediately
Layer 2 Ecosystem
Ethereum L2s
Major rollups:
- Arbitrum: Largest by TVL
- Optimism: OP Stack ecosystem
- Base: Coinbase’s L2
- zkSync: ZK rollup pioneer
- StarkNet: Cairo-based ZK rollup
- Polygon zkEVM: EVM-equivalent ZK
Bitcoin L2s
Limited but growing:
- Lightning Network: Payment channels
- Liquid: Federated sidechain
- Various: RGB, Stacks, etc.
Benefits
Lower Fees
- Transactions batched, costs shared
- 10-100x cheaper than L1
- Enables microtransactions
- Accessible to more users
Higher Throughput
- Not limited by L1 block space
- Thousands of TPS possible
- Near-instant transactions
- Better user experience
Inherited Security
- L1 guarantees preserved
- No new trust assumptions (rollups)
- Escape hatch to L1
- Credible neutrality maintained
Challenges
Complexity
- Additional infrastructure needed
- Bridge risks
- Sequencer dependencies
- User experience fragmentation
Withdrawal Delays
- Optimistic rollups: 7-day withdrawal
- Fast bridges help but add trust
- User experience impact
- Liquidity inefficiency
Centralization
Current state:
- Most L2s have centralized sequencers
- Upgrade keys controlled by teams
- Decentralization progressing slowly
- Trust assumptions exist
Fragmentation
Ecosystem challenges:
- Liquidity split across L2s
- Composability broken
- Many bridges needed
- User confusion
The Future
Decentralized Sequencers
Progress toward:
- Shared sequencing
- Decentralized sequencer sets
- Censorship resistance
- True permissionlessness
Cross-L2 Communication
Improving interoperability:
- Shared bridges
- Message passing
- Unified liquidity
- Better UX
L3 and Beyond
Layering continues:
- Application-specific L3s
- L2s as settlement for L3s
- Modular stack deepening
Conclusion
Layer 2 represents the most practical current path to blockchain scalability, enabling applications that would be impossible on congested, expensive Layer 1s. While challenges around decentralization and interoperability remain, the rapid growth of the L2 ecosystem demonstrates strong product-market fit. Understanding L2 trade-offs is essential for navigating the modern blockchain landscape.