When the Ethereum mainnet is congested, a single transfer can cost several dollars in fees. Layer 2 networks were created to solve this problem: they move most computation off the mainnet and send only the results and data back to it.
$ARB is the governance token of the Layer 2 network Arbitrum. Current price: 0.116 (24h +1.58%).
— What does a Layer 2 do? —
A Layer 2 is a scaling network built on top of the Ethereum mainnet. Transactions are executed on Layer 2 first, then compressed data and results are submitted to the mainnet.
Because many transactions are bundled together for submission, the mainnet costs are shared among them, making fees much lower for each individual transaction. After Ethereum’s Dencun upgrade in March 2024 introduced blob data (EIP-4844), the cost of writing data from Layer 2 to the mainnet fell significantly further.
— Two approaches: optimistic and zero-knowledge —
Optimistic Rollups assume submitted results are correct by default, while allowing a challenge period during which anyone can submit a fraud proof. Arbitrum and Optimism use this approach.
ZK Rollups attach a validity proof (zero-knowledge proof) to each submission, and the result is confirmed as correct once it passes verification on the mainnet. ZKsync and Starknet belong to this category.
— Why withdrawals sometimes take a week —
On an Optimistic Rollup, withdrawing assets back to the mainnet through the official cross-chain bridge requires waiting for the challenge period to end, which usually takes about 7 days. Many third-party cross-chain bridges can deliver assets faster, but they add the risk of the bridge’s own smart contracts and charge fees.
ZK Rollup results are confirmed by proofs, so they don’t need such a long challenge period. Withdrawal wait times mainly depend on the pace of proof generation and submission.
— What to watch out for when using Layer 2 —
When depositing or withdrawing, check which network you’ve selected. Assets at the same address are separate on different networks. Choosing the wrong network may make your assets temporarily inaccessible, or even unrecoverable.
Layer 2 security relies to a large extent on Ethereum mainnet, but each Layer 2 has a different design and level of maturity. Before bridging large amounts or using a new network, try it with a small amount first.
— In a nutshell —
Understanding Layer 2 networks helps explain why the same operation can cost so much more on one network than another, and helps you avoid choosing the wrong network when depositing or withdrawing. Learn the rules before you act; don’t make decisions on impulse.
Have you run into any pitfalls with this? Share your experiences so others can avoid them.