Ethereum is the dominant general purpose blockchain serving as the foundation for decentralized finance (DeFi), NFTs, DAOs, and Web3 apps. But it's become a victim of its own success. Network congestion has driven gas fees to unsustainable levels and constrained scalability.
Many "Ethereum killer" alternative layer 1 chains like Solana and Avalanche have emerged aiming to unseat Ethereum by offering higher transaction throughput. However, Ethereum remains the most secure and decentralized smart contract platform in terms of node count and total value secured.
This is driving solutions to scale Ethereum itself through layer 2 rollup technologies. Rollups can offer 100-1000x higher transaction capacity without compromising Ethereum's security. In this post, we'll do a deep technical dive into rollups and how they provide the best of both worlds - Ethereum's security with vastly greater scalability.
The Limits of Direct Scaling Methods
Before understanding rollups, let's examine why naive direct scaling methods like increasing block size or sharding have proven ineffective long-term solutions:
Bigger blocks - BTC and BCH have bumped block size limits to try to scale on-chain activity. But this worsens centralization - fewer nodes can handle validating bigger blocks, reducing decentralization and security.
Faster blocks - Some networks use shorter block times to increase throughput. But this heightens instability and makes it easier to fork the chain.
Sharding - Sharding splits validators and transactions across parallel chains or shards. However, cross-shard communication and composability introduces huge complexity.
These direct scaling efforts sacrifice decentralization and security. They've resulted in persistent bottlenecks and done little to rival scalability of high-throughput blockchains.
How Rollups Improve Scaling
Rollups take an indirect scaling approach that keeps transaction processing (execution) layer 1 while massively increasing data availability layer 2. This creates massive scalability without reducing Ethereum's security.
Rollups bundle or "roll up" transactions into a single layer 1 transaction. The heavy transaction execution work is done layer 2. The data is compressed and published back to Ethereum.
This minimizes the load on layer 1 while allowing it to inherit the security of Ethereum's decentralized consensus and validator pool. No other scaling solution has achieved this synthesis.
There are two main rollup architectures - zero knowledge (ZK) rollups, and optimistic rollups:
ZK Rollups
ZK rollups bundle hundreds of transactions off-chain. A succinct cryptographic proof called a SNARK is generated to prove the validity of the transactions. This SNARK is submitted on-chain along with the transaction data.
The SNARK allows the Ethereum network to verify the transactions are valid without executing them on-chain. Learn more about how ZK proofs work here.
Benefits of ZK rollups:
- Faster/cheaper transactions - validation is handled off-chain
- Privacy - actual transaction data is not revealed on-chain
Drawbacks:
- Requires generating SNARK proof for each bundle which can be slow
- Funds need to be deposited in advance into layer 2 smart contracts
Top ZK rollup projects:
- zkSync 2.0
- Loopring
- Starkware
Optimistic Rollups
Optimistic rollups take a different approach. They publish transaction data on-chain and assume it's valid. This allows the rollup to process and submit transactions super fast without proofs.
However, there is a challenge period where anyone can submit a fraud-proof to dispute the transaction. If no fraud proof arrives, the transactions are "optimistically" considered settled.
Benefits of optimistic rollups:
- Faster transactions than ZK rollups (no SNARK proofs)
- Funds live layer 1, more accessible and secure
Drawbacks:
- Transactions only finalized after challenge period, not instantly
- No privacy since full transaction data posted on L1
Top optimistic rollup projects:
- Arbitrum
- Optimism
- Offchain Labs
Hybrid Rollups
Some rollup projects are pursuing "hybrid" architectures that blend ZK proofs with fraud proofs for dynamic tradeoffs between scalability and security:
- zkPorter - Uses ZK proofs most of the time but can fallback to fraud proofs for better composability. From Matter Labs.
- Scroll - Uses optimistic approach during low-congestion then switches to ZK proofs during high load for additional scalability. From Offchain Labs.
Hybrid solutions aim to get the best of both ZK and optimistic rollup models. This is an active area of research and development.
Rollup Interoperability
One downside of rollups is that they currently form fragmented liquidity silos. Users must deposit funds to a specific rollup contract to use that protocol's dApps.
However, bridges are in development to allow moving funds between rollup contracts. For example, zkSync and Loopring launched the zkEVM Alliance to build interoperability.
Once transfers between rollups are seamless, they can start to form a multi-chain ecosystem without sacrificing Ethereum's security. This will be a significant milestone in scaling decentralized finance.
Conclusion
Ethereum's dominance is currently threatened by rival networks promising faster and cheaper transactions. But Ethereum remains the most decentralized, secure, and time-tested smart contract blockchain with the most developers and applications.
Layer 2 rollup technologies enable Ethereum to tap into 100-1000x higher scalability by keeping execution off-chain while inheriting Ethereum's robust consensus and security model.
ZK rollups and optimistic rollups offer different tradeoffs between scalability, security, and composability. But combined, rollups are the most promising path to sustainably scaling Ethereum and decentralized finance long-term.
Just like email didn't get scaled by making SMTP more complex, Ethereum won't scale sustainably through clumsy base layer changes either. Rollups are the SMTP relay servers of Ethereum - abstracting away limitations of the underlying network through innovation at the protocol layers above.