The Scalability Trilemma
Ethereum's base layer (L1) is limited to ~15 transactions per second. This constraint, known as the scalability trilemma, forces a choice between decentralization, security, and throughput. Layer 2 solutions bypass this by executing transactions off-chain while inheriting L1's security guarantees.
Rollup Fundamentals
Rollups bundle hundreds of transactions into a single L1 transaction. They post transaction data to L1 (for data availability) but execute computation off-chain. This achieves 10-100x throughput improvement while maintaining L1 security.
Two types dominate the landscape:
- Optimistic Rollups (Arbitrum, Optimism): assume transactions are valid, allow fraud proofs
- ZK Rollups (zkSync, StarkNet): generate mathematical validity proofs for every batch
Optimistic Rollups
Optimistic rollups assume all batched transactions are valid by default. If a validator detects fraud, they can submit a fraud proof within a challenge period (typically 7 days). This optimistic assumption means fast finality for users, but withdrawals to L1 require waiting for the challenge window.
ZK Rollups
Zero-knowledge rollups generate a cryptographic proof (SNARK or STARK) for every batch of transactions. The L1 contract only needs to verify this proof, which is constant-size regardless of how many transactions are batched. This provides instant finality once the proof is verified on L1.
The tradeoff: generating ZK proofs is computationally expensive and complex. General-purpose ZK-EVMs (achieving full EVM compatibility) are still maturing.
Arbitrum Architecture Deep Dive
Arbitrum is the leading optimistic rollup by TVL. Its architecture consists of:
- Sequencer: orders transactions and posts batches to L1
- Validator nodes: verify state transitions and can challenge fraud
- Outbox: processes L2→L1 messages after the challenge period
- Bridge contracts: handle asset deposits and withdrawals
Data Availability
Data availability (DA) is the guarantee that transaction data is accessible for anyone to verify. Rollups post calldata to L1 (expensive) or use EIP-4844 blobs (cheaper, temporary). Future solutions include DankSharding for massive DA bandwidth.
Comparing L2 Solutions
Each L2 approach has distinct tradeoffs in finality time, cost, EVM compatibility, and maturity. Optimistic rollups currently lead in TVL and developer adoption, while ZK rollups promise superior long-term scalability as proof generation becomes more efficient.
Commentaires
Les commentaires utilisent GitHub Discussions via Giscus. Connectez-vous avec GitHub pour participer.
Activez Giscus sur votre repo GitHub pour afficher les commentaires.