If you used Ethereum around 2021, you probably remember this: you wanted to swap a few tokens on a decentralized exchange, and the fee was higher than the amount you were swapping.
Ethereum mainnet can only process so many transactions. When demand surges, users outbid each other with higher fees. The Ethereum community's answer: process most transactions off mainnet, then post the results back to mainnet for security. That's Layer 2.
Key takeaways
- Layer 2 networks are built on top of Ethereum. They process transactions in batches off-chain, then post the data and results to mainnet.
- Most major Layer 2s use rollups, which come in two kinds: optimistic rollups and ZK rollups.
- The Dencun upgrade in March 2024 introduced blob data, slashing Layer 2 transaction costs.
- Watch out for bridge risk, centralized sequencers and roughly seven-day withdrawals through some networks' official bridges.
- Layer 2s vary widely in how decentralized they are. Platforms like L2BEAT publish risk assessments.
Why Ethereum needs Layer 2

Ethereum mainnet handles only a dozen or so transactions per second. Block space is limited, so when demand outstrips it, gas fees spike. For how gas works, see Ethereum basics: smart contracts, gas and PoS.
Simply making mainnet faster usually means heavier hardware requirements for nodes, which makes running one harder for ordinary people and sacrifices decentralization. Ethereum's approach: mainnet focuses on security and data availability, and Layer 2s handle executing transactions.
Think of mainnet as a congested main road and Layer 2 as an elevated expressway above it. Cars (transactions) move quickly on the expressway, but the final travel records are still filed with the main road.
How rollups work

The core idea of a rollup is bundling:
- Users send transactions on the Layer 2, which executes them quickly.
- A sequencer orders and compresses hundreds or thousands of transactions into a batch.
- The batch data and the latest state are posted to Ethereum mainnet.
- Mainnet stores the data and, through a proof system, ensures the results are correct.
Because many transactions share the cost of a single mainnet submission, each one becomes much cheaper.
In March 2024, Ethereum completed the Dencun upgrade. Its EIP-4844 introduced "blob" data space designed for Layer 2s. Posting data got dramatically cheaper, and fees on many Layer 2s dropped to a few cents or less.
Optimistic rollups vs ZK rollups
The main difference is how each proves that the results it posts are correct.
| Optimistic rollup | ZK rollup | |
|---|---|---|
| How it's proven | Results are assumed valid; anyone can submit a fraud proof during a challenge period | Every batch includes a mathematical validity proof |
| Official bridge withdrawals | Usually a roughly seven-day challenge period | Final once the proof is verified, usually faster |
| Complexity | More mature and highly Ethereum-compatible | More complex; generating proofs takes significant computing power |
| Examples | Arbitrum, Optimism, Base | zkSync, Starknet, Linea, Scroll |
The major Layer 2 networks
| Network | Type | Notes |
|---|---|---|
| Arbitrum | Optimistic rollup | One of the earliest major Layer 2s, with a rich DeFi ecosystem |
| Optimism | Optimistic rollup | Created the open-source OP Stack that several networks build on |
| Base | Optimistic rollup | Launched by Coinbase on the OP Stack; opened to the public in August 2023 |
| zkSync Era | ZK rollup | One of the earliest general-purpose ZK rollups |
| Starknet | ZK rollup | Uses its own programming language and virtual machine |
| Linea, Scroll | ZK rollup | Focus on compatibility with the Ethereum Virtual Machine |
Note: each network's architecture, decentralization and ecosystem keep changing. Check official sources and independent assessment platforms for the latest before you use one.
Risks of using Layer 2
- Bridge risk: moving assets between mainnet and a Layer 2 requires a bridge, and bridges have long been a prime hacking target. In 2022, the Ronin sidechain bridge used by Axie Infinity lost more than $600 million. Prefer official bridges or long-proven bridging tools.
- Centralized sequencers: many Layer 2 sequencers are currently run by the project team. If the sequencer goes down, the network may stop producing blocks, and on less decentralized networks, transactions could be censored.
- Upgrade powers: some Layer 2 contracts can be upgraded quickly by a small group, which could in theory be abused. L2BEAT rates networks by decentralization stage (Stage 0, 1 and 2).
- Withdrawal delays: withdrawing to mainnet through an optimistic rollup's official bridge usually takes about seven days. Third-party bridges are faster but add risk and fees.
- Sending to the wrong network: the same wallet address works across networks, but sending assets to a network your exchange doesn't support can leave them stranded or hard to recover.
FAQ
Are Layer 2 addresses the same as mainnet addresses?
Most EVM-compatible Layer 2s (like Arbitrum, Optimism and Base) use the same address format as mainnet, so one wallet works across them. But balances are separate: funds on one network don't automatically show up on another.
What's the difference between a Layer 2 and a sidechain?
Rollups post transaction data to Ethereum mainnet and rely on it for security. Sidechains have their own consensus and validators, so they don't directly inherit Ethereum's security. That's why rollups are generally considered safer.
Why do Layer 2 withdrawals to mainnet take seven days?
That's an optimistic rollup's challenge period. During that window, anyone can challenge an incorrect result, and the withdrawal only finalizes once it ends. ZK rollups rely on validity proofs and usually don't need such a long wait.
Are my assets safe on a Layer 2?
Rollups are designed to inherit Ethereum's security, but how safe each one is in practice depends on whether its proof system is complete, whether upgrade powers are limited and whether its sequencer is decentralized. Check its risk rating on a platform like L2BEAT before using it.
Summary
Layer 2 is Ethereum's main scaling path: mainnet provides security, and Layer 2s deliver speed and low costs. Optimistic and ZK rollups each have trade-offs, and since the Dencun upgrade, using a Layer 2 has become far cheaper.
Behind the speed and savings, though, sit bridge risk, centralized sequencers and upgrade powers that are worth understanding. To learn how Ethereum staking works, read our Ethereum staking guide. This article is for education only and isn't investment advice.

Covers Ethereum and DeFi: smart contracts, gas, Layer 2, and how decentralized exchanges and lending protocols work, and where they can fail.
Our editorial principles →

