Blockchain & Networks
Layer 2
A secondary protocol built on top of a base blockchain that increases transaction throughput and reduces fees.
A Layer 2 scaling technique that bundles multiple transactions off-chain and posts compressed proofs to the base blockchain.
A rollup is a Layer 2 scaling solution that executes transactions off-chain, bundles them together, and posts compressed data back to the base blockchain. By moving the computational work off the main chain while still anchoring the results to Layer 1, rollups inherit the security guarantees of the underlying network while dramatically increasing throughput and lowering gas fees. Rollups have become the dominant scaling strategy for Ethereum and are fundamental to making DeFi applications accessible to a broader user base.
At a high level, a rollup operates by collecting user transactions on a separate execution layer, processing them in batches, and then publishing a compressed summary of those transactions to the Layer 1 chain. The Layer 1 serves as the final settlement and data availability layer, ensuring that anyone can reconstruct the state of the rollup from the data posted on-chain.
The key insight behind rollups is that execution is the most expensive part of blockchain processing. By moving execution off-chain and only posting results and compressed data to Layer 1, rollups achieve significant cost savings — often reducing transaction fees by 10 to 100 times compared to executing directly on Ethereum mainnet.
A rollup typically consists of several components: a sequencer that orders and batches transactions, an execution environment that processes the transactions, a state commitment mechanism that records state roots on Layer 1, and a proof system that ensures the validity of the off-chain computation.
Optimistic rollups operate on the assumption that all submitted transactions are valid by default — hence the name "optimistic." When a batch of transactions is posted to Layer 1, it is accepted provisionally. A challenge period, typically seven days, opens during which anyone can submit a fraud proof if they detect an invalid state transition.
If a fraud proof is submitted and verified, the invalid batch is reverted and the malicious sequencer is penalized. If no challenge is raised during the window, the batch is considered finalized. This design keeps the normal-case cost low (no proofs needed when everyone behaves honestly) but introduces a withdrawal delay equal to the challenge period.
Arbitrum and Optimism (OP Mainnet) are the two leading optimistic rollup networks. Both support full EVM compatibility, meaning existing Ethereum smart contracts and developer tools work with minimal or no modification. This compatibility has made optimistic rollups the first choice for many DeFi protocols expanding to Layer 2.
ZK rollups take a fundamentally different approach by using cryptographic validity proofs — specifically zero-knowledge proofs — to mathematically verify the correctness of every batch before it is accepted on Layer 1. Rather than assuming transactions are valid and waiting for challenges, ZK rollups prove they are valid upfront.
This eliminates the need for a challenge window, enabling much faster finality. Once a validity proof is verified on-chain, the batch is immediately considered final. Withdrawals from ZK rollups can therefore be processed much more quickly than from optimistic rollups.
The trade-off is computational complexity. Generating zero-knowledge proofs is resource-intensive, and achieving full EVM equivalence within a ZK proof system is technically challenging. Networks like zkSync, StarkNet, Polygon zkEVM, and Scroll are actively working to bring full EVM-compatible ZK rollups to production, with significant progress in recent years.
Rollups have transformed DeFi by making transactions affordable enough for everyday use. On Ethereum mainnet, a simple token swap might cost $10-50 in gas during periods of congestion. On a rollup, the same transaction typically costs a few cents. This cost reduction has enabled lending protocols, decentralized exchanges, and other DeFi applications to serve users who would otherwise be priced out of on-chain activity.
For borrowers and lenders specifically, rollups enable more frequent position management, tighter liquidation parameters (since liquidators can act more cheaply), and better capital efficiency overall. Lending protocols like Aave now operate across multiple rollup networks, offering the same core functionality at a fraction of the mainnet cost. Some aggregators support borrowing across several rollup-based networks including Arbitrum, Optimism, and BASE, allowing Bitcoin holders to access competitive lending rates on Layer 2.
The primary ongoing cost for a rollup is posting compressed transaction data to Layer 1. Ethereum's EIP-4844 upgrade (Proto-Danksharding) introduced blob transactions specifically to reduce this cost, creating a dedicated data channel for rollups that is significantly cheaper than regular calldata. This has further reduced fees on rollup networks and set the stage for future data availability improvements.
Some rollup designs are exploring alternative data availability solutions — posting data to specialized DA layers like Celestia rather than directly to Ethereum. These "validiums" or "optimiums" trade some of Ethereum's security guarantees for even lower costs, representing a spectrum of design choices between cost and security.
For end users, the choice between rollup networks depends on their priorities. Optimistic rollups currently offer the broadest DeFi ecosystem and deepest liquidity. ZK rollups offer faster finality and stronger theoretical security guarantees but are still maturing in terms of ecosystem development. Both types represent a massive improvement over Layer 1 in terms of cost and speed, and the trend toward cross-chain interoperability means users will increasingly be able to move between them seamlessly.
Related Terms
Blockchain & Networks
A secondary protocol built on top of a base blockchain that increases transaction throughput and reduces fees.
Blockchain & Networks
A gas fee is the transaction cost paid to validators for processing and confirming operations on a blockchain network.
Blockchain & Networks
A cryptographic technique that proves a statement is true without revealing any of the underlying data used in the proof.
Blockchain & Networks
A blockchain is a distributed, immutable digital ledger that records transactions across a decentralized network of computers.