Understanding Ethereum Rollups Cost: Optimistic vs. ZK

Momodu Afegbua
3 min readJan 24, 2025

--

Ethereum Optimistic and ZK rollups

What is one problem that Ethereum, and blockchain as a whole, has faced till now? Scalability. Imagine a busy highway that everyone wants to use, but there’s a traffic jam. This is a bit like Ethereum now — it will take you to the final destination, but it can get slow and expensive when a lot of people are using it at once. That is, you will burn more fuel (gas) and you will get to your destination late.

Okay… Instead of having just one busy highway, how about we create smaller roads that might or might not lead you to the final destination, then put people in buses instead of personal cars? Hence the introduction of Layer 2 (L2) solutions, and that is how we had Optimistic Rollups and Zero Knowledge (ZK) Rollups. Rollups are scaling solutions that process transactions in bundles.

How they work

Optimistic Rollups: Assume all transactions are valid unless proven otherwise. On rare occasions that a transaction needs to be challenged, it needs gas. This approach is like journeying to your final destination on an unfamiliar route and you’re, “…assuming you’re on the right path until proven wrong.” If proven wrong, you will need to turn around, burn more fuel, and also waste time.

ZK Rollups: Use complex math to prove that transactions are valid without revealing the details. This is like a bus navigation system saying, “…I can prove to you that this is the right path, but I don’t know how I did it.”

Now, away from using the highway. Let’s talk about the gas cost for the rollups

Rollup Cost Comparison

The gas cost of rollups differs because of how they process and upload data to Ethereum. Let’s consider one example: Sending 0.4 ETH from Bob to Alice.

Optimistic Rollups:

  • Initial cost: $0.10 per transaction (for data upload to Ethereum L1)
  • Potential challenge cost: $5.00 (if there is need to challenge the transaction)
  • Average cost: $0.10 + (0.01 * $5.00) = $0.15 (assuming a 1% chance of a challenge)
  • Total cost: $0.15

ZK Rollups:

  • Initial cost: $0.50 per transaction (for mathematical proof and data upload)
  • Ongoing cost: $0.00 (no further challenges needed)
  • Average cost: $0.50

In both cases, Bob sent Alice 1 ETH. However, ZK Rollups encode validity proofs, enabling anyone to validate each transaction.

Cost Distribution:

Remember the transactions are done in batches? Ideally, the cost is distributed amongst users. Say you have 30 people in a bus going to your final destination, everyone pays for the cost of transportation. Cost distribution is based on how many users are active on a network.

  • For Optimistic Rollups: Costs are generally split evenly among users. There are more users in here: Base, the most popular L2 network as at today is based on optimistic rollup and uses op-stack.
  • And for ZK Rollups: Due to higher computational complexity, and the fact that it is relatively new and thus have fewer users, fewer users mean higher individual fees, whereas more users can help distribute costs effectively.

--

--

Momodu Afegbua
Momodu Afegbua

Written by Momodu Afegbua

IT Infrastructure and DevOps Engineer | I mostly write things in here so I can read them again when I get lost — eventually.

No responses yet