Scaling: Rollups And Layer 2
You learn why blockchains hit capacity limits and how rollups move work off the main chain while keeping its security. You also learn how optimistic and zero-knowledge rollups differ, why data availability matters, and how bridges work.
You Will Be Able To
- Explain why a base blockchain has limited capacity and why fees rise with demand.
- Describe how a rollup executes transactions off chain and posts results to Ethereum.
- Compare optimistic and zero-knowledge rollups at an introductory level.
- Explain why data availability is required for users to leave a rollup safely.
- Evaluate the risks of a bridge before moving funds.
The Scaling Problem
In weeks 4 and 5 you saw that every full node of a network such as Ethereum re-executes every transaction and stores the resulting state. That is the source of its security: anyone can check the work. It is also the source of its limit. A block has a fixed capacity, and when more people want space than the block can hold, users bid against each other and fees rise.
Making blocks much larger would increase throughput, but it would also raise the cost of running a node. If only well-funded machines can keep up, fewer people verify the chain, and the network drifts toward trust in a small group. Developers often describe this tension as a trilemma between scalability, security and decentralization: improving one tends to strain another.
Ethereum chose a path where the base layer (layer 1) stays modest and verifiable, while other networks built on top (layer 2) handle most of the activity. The central tool of that plan is the rollup.
| Property | Meaning |
|---|---|
| Decentralisation | Many people can run nodes |
| Security | Attacks are costly |
| Scalability | Many transactions per second |
A design usually strengthens two properties at some cost to the third. Source: Common framing in Ethereum research
The Rollup Idea
A rollup is a separate chain that executes transactions off Ethereum, then 'rolls up' the results and posts them to Ethereum. Three parts make it work. A sequencer receives user transactions, orders them and produces blocks quickly, often in a second or less. The rollup publishes compressed transaction data to Ethereum. And a contract on Ethereum receives a proof or a claim about the new state and records it.
Because the transaction data lives on Ethereum, the rollup inherits Ethereum's ordering and its record keeping. One Ethereum transaction can carry the data of hundreds of rollup transactions, so the base fee is shared among many users. The result is lower fees for users and the same final settlement layer.
The open question is how Ethereum knows that the state the rollup claims is correct. Two answers have emerged, and they define the two families of rollups.
- Users send transactions to the rollup
- Sequencer orders and executes them
- Batch is compressed
- Data is posted to Ethereum
- Layer 1 records the result
Execution happens off chain; data and settlement stay on Ethereum.
Optimistic Rollups
An optimistic rollup assumes that the state posted to Ethereum is correct unless someone shows otherwise. After a new state is posted, a challenge period begins. During that time, any observer who recomputes the transactions and finds an error can submit a fraud proof. If the proof is valid, the incorrect state is discarded and the party that posted it loses a deposit.
This design is simple to run with the existing Ethereum virtual machine, so ordinary Solidity contracts work with little or no change. Arbitrum and Optimism are well-known examples. The cost appears when you withdraw to Ethereum through the native bridge: you wait until the challenge period ends, which is commonly around a week. Fast exits exist through liquidity providers who advance the funds for a fee.
Security rests on at least one honest, watching participant who can submit a fraud proof in time. That assumption needs real tooling and real watchers, and it is worth checking how a given rollup implements it.
Zero-Knowledge Rollups
A zero-knowledge rollup, or ZK rollup, posts a validity proof with each batch. A validity proof is a short piece of cryptography that convinces a verifier that the new state follows correctly from the old state and the listed transactions. Despite the name, the main benefit for scaling is not secrecy. It is succinctness: checking the proof on Ethereum is far cheaper than re-running the transactions. The term zero-knowledge refers to a property of some proof systems that also allows hiding information, which you met in week 2.
Since the proof is checked when it is posted, there is no need for a long challenge period. Withdrawals can finalize once the proof is accepted, in a time that depends on how often the rollup submits proofs. The trade-off is complexity. Generating proofs takes heavy computation, and proving the full Ethereum virtual machine, in a so-called zkEVM, has been a demanding engineering effort. zkSync and Starknet are examples of ZK rollups, and they differ in how closely they match the Ethereum virtual machine.
As a first rule of thumb: optimistic rollups rely on a challenge window and honest watchers, while ZK rollups rely on mathematics and the correctness of complex proving software.
| Question | Optimistic | Zero-knowledge |
|---|---|---|
| How is a batch trusted | Assumed valid unless challenged | Proven valid with a cryptographic proof |
| Withdrawal to layer 1 | About seven days on major networks | After the proof is verified |
| Main cost | Waiting for the challenge window | Computing the proofs |
Both post transaction data to Ethereum; they differ in how validity is shown. Source: ethereum.org documentation: Scaling
Data Availability
Data availability means that the transaction data behind a state is published and can be downloaded by anyone. It is required for safety in both rollup types. If the data is hidden, nobody can rebuild the rollup state, nobody can check a fraud claim, and users may be unable to prove how much they own and withdraw it.
Early rollups posted data as calldata, an expensive part of an Ethereum transaction. In 2024, the Dencun upgrade introduced blobs, a cheaper kind of data space designed for rollups, through a change called EIP-4844. Blobs are kept by the network for a limited time rather than forever, which is enough for anyone to reconstruct and verify the rollup state. After the upgrade, rollup fees fell significantly.
Some systems post data elsewhere, in a separate data availability layer or with a committee. Designs that do this are often called validiums or optimiums. They can be cheaper, but users must trust that the outside layer keeps the data available. When you compare networks, always ask where the data lives.
- On Ethereum: strongest guarantee, higher cost.
- Blobs: temporary storage built for rollups.
- Outside layers: lower cost, extra trust assumption.
The Layer 2 Landscape
Many layer 2 networks now exist, and they differ in more than fees. Arbitrum, Optimism and Base are optimistic rollups; Base and others build on the open-source OP Stack that Optimism published. zkSync and Starknet are ZK rollups. Each has its own apps, wallets, tokens and tooling.
Three questions help to compare them. Who runs the sequencer? In most networks today a single operator does, which is fast but means that the operator can delay your transactions, so look for an escape route that lets you force a transaction through Ethereum. Who can upgrade the contracts? A multisignature group with the power to change rules instantly adds trust. Where does the data live? The independent tracker L2BEAT publishes risk summaries for many networks and is a good starting place for these checks.
Also remember that assets on different rollups are separate. A token on one network is not automatically usable on another, which leads to the topic of bridges.
Bridges And Their Risks
A bridge moves value between chains. A common design locks tokens in a contract on the source chain and mints a matching representation on the destination chain. To go back, you burn the representation and the original tokens unlock. The native bridge of a rollup is built into its Ethereum contracts and inherits its security model.
Third-party bridges use their own validators, multisignature groups or relayers to confirm transfers. If those parties are compromised or the contract has a bug, the locked funds can be drained, and the minted tokens on the other chain lose their backing. Several bridge attacks have been among the largest thefts in crypto, which makes bridges one of the best-documented high-risk areas.
Practical habits help. Prefer the native bridge when the amount is large and time allows. Test with a small transfer first. Check the official site address from a trusted source, since fake bridge pages are a common phishing method (week 10 covers this). Use a test network while learning, since Sepolia and the test networks of many rollups all have free coins.
In the exercise you will compare the fee of your week 7 token deployment on Sepolia with a deployment on a rollup test network, and you will read a risk summary for one rollup.
Key Terms
- Layer 2
- A network built on top of a base chain that handles transactions and relies on the base chain for settlement.
- Rollup
- A layer 2 that executes transactions off chain and posts their data and a result to Ethereum.
- Sequencer
- The operator that orders transactions on a rollup and produces its blocks.
- Fraud proof
- Evidence submitted during a challenge period that shows a posted state is wrong.
- Validity proof
- A cryptographic proof that a batch of transactions produced the claimed new state.
- Data availability
- The guarantee that the data behind a state is published and can be downloaded by anyone.
- Blob
- A temporary data space on Ethereum, introduced by EIP-4844, that lets rollups post data cheaply.
- Bridge
- A system that moves tokens or messages between two blockchains.
- Challenge period
- The waiting time in an optimistic rollup during which a posted state can be disputed.
Exercise: Compare Fees And Read A Risk Summary
- Open L2BEAT and pick two rollups, one optimistic and one ZK. Note who runs the sequencer, where the data is stored, and the upgrade delay for each.
- Add the test network of one rollup to your wallet, such as Arbitrum Sepolia, Optimism Sepolia or Base Sepolia, using the official network list on its documentation site.
- Get test coins on Sepolia from a faucet, then use the rollup's official testnet bridge to move a small amount to the rollup test network.
- Deploy your ClassToken from week 7 on the rollup test network in Remix, using the same contract and the same initial supply.
- Open the two deployment transactions in their block explorers and compare the fee paid on each network.
- Write a short paragraph: which network would you pick for a small app, and why, using sequencer, data and upgrade control as your criteria.
Further Reading
- An Incomplete Guide to Rollups, Vitalik Buterin, vitalik.eth.limo blog, 2021
- Ethereum.org documentation: Scaling and Layer 2, Ethereum Foundation, ethereum.org
- EIP-4844: Shard Blob Transactions, Vitalik Buterin and co-authors, Ethereum Improvement Proposals
- L2BEAT: Layer 2 risk analysis, L2BEAT, l2beat.com
- Mastering Ethereum, Andreas M. Antonopoulos and Gavin Wood, O'Reilly Media