Glossary

Rollup

A Layer 2 scaling solution that executes transactions off-chain and posts compressed data or proofs to the base layer for security.

Key Takeaways

  • Rollups are Layer 2 scaling solutions that execute transactions off-chain while posting compressed data or cryptographic proofs to the base layer, inheriting its security guarantees without congesting it.
  • Two main types exist: optimistic rollups (which assume transactions are valid unless challenged via fraud proofs) and ZK rollups (which attach mathematical validity proofs that the base layer can verify instantly), each with distinct trust assumptions and finality characteristics.
  • Building rollups on Bitcoin is significantly harder than on Ethereum due to Bitcoin's limited scripting capabilities, but emerging approaches like BitVM and covenant proposals are making Bitcoin-native rollups increasingly viable.

What Is a Rollup?

A rollup is a Layer 2 scaling architecture that moves transaction execution off-chain while relying on the base layer (Layer 1) for data availability and final settlement. Instead of every node on the base chain processing every transaction, a rollup bundles hundreds or thousands of transactions into a single compressed batch, then posts a summary back to the base layer. This lets the network handle far more throughput without sacrificing the security of the underlying chain.

Think of it like a branch office that processes paperwork locally and sends only the final results to headquarters. The headquarters (Layer 1) doesn't need to review every document: it just needs enough information to verify that the branch did its job correctly. The "rollup" name comes from this process of rolling up many transactions into one on-chain commitment.

Rollups emerged primarily in the Ethereum ecosystem, where they have become the dominant scaling strategy. Projects like Arbitrum, Optimism, zkSync, and StarkNet process millions of transactions while posting proofs or data to Ethereum. The Bitcoin ecosystem has been exploring rollup designs more recently, with unique challenges and trade-offs driven by Bitcoin Script's constraints.

How It Works

All rollups share a common architecture built on three core components: off-chain execution, on-chain data availability, and a verification mechanism.

Off-Chain Execution

A rollup operator (sometimes called a sequencer) collects transactions from users, orders them, and executes them in an off-chain environment. This execution produces a new state: updated account balances, contract storage changes, or UTXO modifications. Because execution happens off-chain, it can be much faster and cheaper than on-chain processing.

// Simplified rollup batch structure
{
  "batch_number": 4521,
  "transactions": [
    { "from": "0xA1...", "to": "0xB2...", "amount": 500, "nonce": 12 },
    { "from": "0xC3...", "to": "0xD4...", "amount": 200, "nonce": 7 },
    // ... hundreds more transactions
  ],
  "prev_state_root": "0x8a3f...",
  "new_state_root": "0x2b7c...",
  "compressed_data": "0x01a4f8..." // All tx data compressed
}

On-Chain Data Availability

After executing a batch, the rollup posts enough data to the base layer that anyone can reconstruct the rollup's state independently. This is critical: if the rollup operator disappears or acts maliciously, users need the ability to prove their balances and withdraw funds using only data available on the base chain.

Data availability is what distinguishes rollups from sidechains. A sidechain has its own consensus and data availability, meaning users trust the sidechain validators to keep data accessible. A rollup inherits data availability from the base layer, so users only need to trust the base layer's security.

Verification Mechanism

The base layer needs a way to confirm that the rollup operator executed transactions correctly. This is where the two rollup types diverge: optimistic rollups use fraud proofs, while ZK rollups use validity proofs.

Optimistic Rollups

Optimistic rollups assume that every batch submitted by the operator is valid. They are "optimistic" because they trust the operator by default and only verify when someone raises a challenge. This approach minimizes on-chain computation during normal operation.

Fraud Proof Mechanism

After a batch is posted, there is a challenge period (typically 7 days) during which any observer can submit a fraud proof if they detect an invalid state transition. The fraud proof process works as follows:

  1. The operator posts a batch with a claimed new state root to the base layer
  2. Verifiers independently re-execute the transactions and compare results
  3. If a verifier detects a discrepancy, they submit a fraud proof identifying the specific invalid transaction
  4. The base layer contract re-executes the disputed transaction on-chain to determine the correct result
  5. If fraud is confirmed, the batch is reverted and the operator loses their staked bond

The downside is withdrawal latency. Users wanting to move funds back to the base layer must wait for the entire challenge period to expire before their withdrawal finalizes. This means finality for withdrawals can take a week or more, though third-party liquidity providers often offer faster exits for a fee.

ZK Rollups

ZK (zero-knowledge) rollups take the opposite approach: they prove correctness upfront rather than assuming it. Every batch includes a cryptographic validity proof that mathematically guarantees the state transition was computed correctly. The base layer verifies this proof on-chain, and if it checks out, the batch is accepted immediately.

Validity Proof Mechanism

The proof generation process compresses the verification of thousands of transactions into a single, small proof:

  1. The operator executes transactions and produces the new state
  2. A prover circuit generates a cryptographic proof (SNARK or STARK) attesting that the state transition is valid
  3. The operator posts the compressed transaction data and the proof to the base layer
  4. A verifier contract on the base layer checks the proof, which takes constant time regardless of how many transactions were in the batch
  5. If the proof is valid, the new state is accepted with no challenge period required

ZK rollups offer faster finality since there is no challenge period. Withdrawals can complete as soon as the proof is verified on-chain. The trade-off is computational cost: generating validity proofs is resource-intensive, and the proving systems are more complex to implement and audit.

Comparing the Two Approaches

PropertyOptimistic RollupZK Rollup
VerificationFraud proofs (reactive)Validity proofs (proactive)
Withdrawal time7+ days (challenge period)Minutes to hours (proof generation)
On-chain costLower (proofs only when challenged)Higher (proof verified every batch)
Computation overheadMinimal off-chainHeavy proof generation
EVM compatibilityEasier to achieveHarder (ZK circuits for general computation)
Security assumptionAt least one honest verifier existsCryptographic soundness of proof system

Rollups on Bitcoin

Building rollups on Bitcoin presents unique challenges that don't exist on Ethereum. On Ethereum, smart contracts can verify fraud proofs or validity proofs directly because the EVM supports arbitrary computation. Bitcoin's scripting language is intentionally limited: it cannot natively verify SNARK/STARK proofs or execute the complex logic needed for interactive fraud proof games.

Why Bitcoin Rollups Are Harder

Several factors make Bitcoin rollup development more constrained than on Ethereum:

  • No stateful smart contracts: Bitcoin Script is stack-based and deliberately non-Turing-complete, meaning on-chain verification logic must be expressed within tight constraints
  • Limited OP_RETURN space: Bitcoin transactions can embed only 80 bytes of arbitrary data in OP_RETURN outputs, making data availability expensive and requiring creative solutions like inscriptions or alternative data availability layers
  • No native proof verification: Bitcoin cannot natively verify zero-knowledge proofs, so validity proof rollups require off-chain verification or new opcodes
  • Conservative upgrade culture: Bitcoin's development process prioritizes stability and security, meaning new opcodes like OP_CAT that could enable rollup verification face extensive review periods

BitVM and Fraud Proofs on Bitcoin

BitVM is a paradigm that enables computation verification on Bitcoin without requiring protocol changes. It works by expressing any computation as a series of logic gates, then encoding a fraud proof protocol using Bitcoin's existing scripting primitives (hash locks and timelocks).

The core idea: an operator makes a claim about a computation result and commits to it on-chain. If the claim is false, a verifier can challenge it through an interactive bisection protocol, narrowing down to a single gate where the operator provably lied. The on-chain dispute resolution requires only simple operations that Bitcoin Script can handle.

BitVM enables optimistic rollups on Bitcoin by providing the fraud proof verification layer. Projects exploring this approach include BitVM-based bridges and rollup designs that post transaction data to Bitcoin while using BitVM for dispute resolution.

Covenant-Based Approaches

Proposed Bitcoin covenant opcodes could significantly improve rollup feasibility. Covenants allow transaction outputs to restrict how they can be spent in the future, enabling more sophisticated on-chain verification:

  • OP_CAT could enable on-chain verification of Merkle proofs and potentially STARK proofs, opening the door to ZK rollups on Bitcoin
  • OP_CHECKTEMPLATEVERIFY (CTV) could enforce specific withdrawal transaction structures, improving rollup exit mechanisms
  • Combined covenant proposals could enable trust-minimized bridges between Bitcoin and rollup layers

For a deeper exploration of how covenants expand Bitcoin Script's capabilities, see the Bitcoin covenants explainer.

Rollups vs Other Layer 2 Approaches

Rollups are one of several Layer 2 scaling strategies. Each approach makes different trade-offs between security, performance, and complexity. For a comprehensive comparison, see the Bitcoin Layer 2 comparison.

ApproachData AvailabilitySecurity ModelBest For
RollupOn base layerInherits base layer securityGeneral-purpose scaling
SidechainOwn chainOwn validator setApplication-specific chains
State channelBetween participantsOn-chain dispute resolutionHigh-frequency bilateral payments
ValidiumOff-chain (committee)Validity proofs + data committeeHigh throughput, lower security needs

The key distinction is data availability. State channels (like the Lightning Network) keep data between participants and only touch the base layer for disputes. Sidechains manage their own data availability with separate validator sets. Rollups post data to the base layer, giving them the strongest security inheritance but at higher on-chain cost.

Use Cases

  • General-purpose smart contracts: Ethereum rollups like Arbitrum and Optimism run full EVM environments, enabling DeFi, NFTs, and complex applications at a fraction of Layer 1 cost
  • High-throughput payments: rollups can batch thousands of transfers into a single on-chain transaction, dramatically reducing per-payment costs while inheriting base layer security
  • Token transfers and stablecoin movement: rollups enable low-cost transfers of tokens and stablecoins while maintaining strong settlement guarantees from the base layer
  • Bitcoin-based applications: emerging Bitcoin rollups aim to bring programmability to Bitcoin without modifying the base protocol, enabling smart contract functionality secured by Bitcoin's proof-of-work
  • Privacy-preserving transactions: ZK rollups can incorporate privacy features where the validity proof confirms correctness without revealing individual transaction details

Risks and Considerations

Sequencer Centralization

Most rollups today rely on a single sequencer to order and execute transactions. While this cannot compromise funds (the base layer enforces correctness), a centralized sequencer can censor transactions, extract MEV (maximal extractable value), or go offline entirely. Decentralizing sequencers is an active area of research, but no production rollup has fully solved this problem.

Data Availability Costs

Posting data to the base layer is the primary cost for rollups. On Ethereum, this improved with EIP-4844 (proto-danksharding), which introduced a dedicated data blob space. On Bitcoin, data availability is even more constrained and expensive due to limited block space and the 80-byte OP_RETURN limit.

Bridge Security

Moving funds between the base layer and a rollup requires a bridge contract. Bridge security is critical: bugs or compromises in the bridge can result in total loss of funds. Optimistic rollup bridges have the challenge period as a safety mechanism, while ZK rollup bridges rely on the soundness of the proof system.

Maturity of Bitcoin Rollups

Bitcoin rollup technology is still in its early stages. BitVM-based designs have not yet been battle-tested in production, and covenant opcodes that would improve rollup feasibility have not been activated on Bitcoin's mainnet. Users should evaluate Bitcoin rollup projects carefully, understanding that the security guarantees may be weaker than those of mature Ethereum rollups. Alternative Bitcoin scaling solutions like Spark take different architectural approaches that may be better suited to Bitcoin's current capabilities.

Upgrade and Governance Risks

Rollup smart contracts on the base layer are often upgradeable, meaning a multisig or governance process can modify the rollup's core logic. This introduces trust assumptions: users must trust that the upgrade mechanism will not be used maliciously. Immutable rollup contracts eliminate this risk but prevent bug fixes and improvements.

This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.