MrDeFi
Layer 2 & Scaling2026-05-023 min read

How Do Rollups Work? A Technical Breakdown

How do rollups work? A step-by-step breakdown of how they batch transactions, post data to Ethereum, and inherit L1 security.

Rollups work by executing transactions off Ethereum's main chain, bundling many of them into a single batch, and posting the resulting data (and, for validity rollups, a cryptographic proof) back to Ethereum, letting the network handle far more transactions per second while still inheriting Ethereum's security for the correctness of the underlying data.

Rollups are the centerpiece of Ethereum's current scaling roadmap, covered broadly in our Layer 2 guide, and understanding their mechanics helps explain both their benefits and their current limitations.

Step 1: Transaction submission and sequencing

Users submit transactions to a rollup's sequencer, an entity (currently centralized for most rollups) responsible for ordering incoming transactions and executing them against the rollup's own state. Because this happens off Ethereum's main chain, it can happen much faster and more cheaply than submitting directly to Ethereum, since the sequencer isn't competing for space in Ethereum's own blocks for every individual transaction.

Step 2: Off-chain execution

The sequencer executes the batch of transactions against the rollup's virtual machine, whether that's a full EVM equivalent used by optimistic rollups, or a zkEVM or custom VM used by validity rollups like zkSync Era or Starknet. This execution updates account balances, smart contract state, and anything else the transactions affect, entirely off-chain at this stage.

Step 3: Posting data to Ethereum

This is the step that actually gives rollups their security. The rollup posts compressed transaction data, and for validity rollups, a cryptographic proof of correct execution, to a smart contract on Ethereum. This matters for two separate reasons:

  • Data availability: because the data is published on Ethereum, anyone can reconstruct the rollup's full state independently, without trusting the sequencer's word for what happened. This is explored further in our data availability guide.
  • Verifiability: for optimistic rollups, this posted data is what a challenger would need to construct a fraud proof if they believe a batch was processed incorrectly. For validity rollups, the accompanying cryptographic proof lets Ethereum's smart contract verify correctness directly and immediately.

Step 4: Dispute or verification

Optimistic rollups enter a challenge window, typically about a week, during which anyone can submit a fraud proof if they detect an invalid state transition in the posted batch. If no one successfully disputes it, the batch is treated as final once the window closes.

Validity (ZK) rollups skip this waiting period because the cryptographic proof submitted alongside the batch mathematically demonstrates correctness, and Ethereum's verifier contract checks that proof directly. Once verified on-chain, the batch is immediately final.

Step 5: Withdrawals back to Ethereum

Because rollup state ultimately settles back to Ethereum, users can withdraw funds from the rollup to Ethereum mainnet using the rollup's official bridge contracts. Optimistic rollups require waiting out the challenge window before a native withdrawal completes, while validity rollups can generally process withdrawals faster since finality doesn't depend on a dispute period. Third-party liquidity providers on both types of rollups often offer faster withdrawals for a fee, effectively fronting the user the funds and taking on the wait themselves.

Why this design actually improves security over a plain sidechain

The key insight is that posting full transaction data (and proofs, where applicable) to Ethereum means the rollup's correctness doesn't rely purely on trusting its own operator or validator set, unlike a sidechain such as Polygon PoS, which secures itself independently and only periodically checkpoints to Ethereum. A rollup's data is public and verifiable on Ethereum itself, which is what allows fraud proofs or validity proofs to function at all.

Rollup mechanics: optimistic vs. validity

Step Optimistic rollup Validity (ZK) rollup
Assumed validity Yes, by default No, proven mathematically
Data posted Transaction data Transaction data + validity proof
Dispute mechanism Fraud proof during challenge window Cryptographic proof verified on-chain
Finality delay ~7 days Much shorter, no dispute window

Bottom line

Rollups scale Ethereum by moving execution off-chain while still posting enough data (and, for validity rollups, a mathematical proof) back to the base layer to preserve verifiability, which is what distinguishes them from an independent sidechain securing itself entirely on its own. The specific dispute or verification mechanism, fraud proofs versus validity proofs, is the main technical fork in the road between the two rollup families, covered in more depth in our optimistic vs. ZK rollups guide. Whichever type you use, remember that most rollups today still rely on a centralized sequencer, a real and current risk worth understanding before depositing significant funds.

Related articles

This article is for educational purposes only and is not financial advice. DeFi involves significant risk, including total loss of funds. Always do your own research.