MoonPay logo
0 minsPublished on 5/13/2024

What are Rollups? A guide to ZK-Rollups and Optimistic Rollups

Discover how blockchain rollup solutions like ZK-Rollups and Optimistic Rollups are transforming scalability in the crypto world.

By Corey Barchat

What are rollups?

Scalability is one of the trickier challenges to solve in the world of blockchain technology.

As networks like Ethereum and Bitcoin grow in popularity, transactions can become a bottleneck, potentially leading to network congestion and high network fees.

This is where rollups come in. But what are they and how do they work?

In this guide we’ll explore what rollups are, how they function, as well as their benefits and limitations.

What is a blockchain rollup?

A blockchain rollup is a Layer-2 scaling solution designed to increase the throughput of a blockchain network like Ethereum. It does this by batching or "rolling up" multiple transactions and then submitting them to the main chain as a single transaction. The two main types are ZK-Rollups and Optimistic Rollups.

Rollup solutions were developed as a response to the growing demand for blockchain scalability. In particular, networks like Ethereum carry high gas fees and slow transaction times that have been persistent issues for users.

By moving a significant portion of transaction processing off-chain, rollups can significantly increase a blockchain's capacity to handle more transactions without requiring drastic changes to the core architecture.

They can be particularly useful for decentralized finance (DeFi), gaming, and other applications requiring high throughput and low transaction fees.

What is a ZK-Rollup?

A ZK-Rollup, or Zero-Knowledge Rollup, is a type of rollup that uses zero-knowledge proofs to ensure the validity of batched transactions. ZK-Rollups process multiple transactions off-chain and convert them into a cryptographic proof (a "zero-knowledge proof") that is submitted to the main blockchain.

ZK-Rollups offer several benefits:

  • Security: The cryptographic nature of zero-knowledge proofs ensures high security, making it difficult to tamper with or forge transactions.
  • Privacy: Since zero-knowledge proofs do not reveal the actual underlying transaction data, ZK-Rollups can offer enhanced privacy compared to traditional on-chain transactions.
  • Efficiency: By submitting only the proof to the main chain, ZK-Rollups reduce the amount of data stored on-chain, improving scalability and reducing congestion.

ZK-Rollups are particularly popular in applications that require greater privacy and security, including decentralized finance (DeFi) and gaming. Although ZK-Rollups are resource-intensive due to the number of cryptographic computations involved, they offer a robust and secure solution for scaling blockchains.

What is an Optimistic Rollup?

An Optimistic Rollup is another type of rollup that operates on the assumption that all batched transactions are valid. Transactions are processed off-chain and then submitted to the main blockchain with a "challenge period" that allows users to dispute potentially invalid transactions.

If no challenges are raised, the transaction is considered valid, but if a challenge is successful, the invalid transaction is reverted, ensuring the integrity of the rollup. This approach allows for a significant reduction in on-chain congestion.

Optimistic Rollups provide several advantages over other rollup protocols:

  • Scalability: By processing transactions off-chain and assuming they are valid, Optimistic Rollups can achieve high throughput and reduced on-chain congestion.
  • Lower fees: The off-chain processing and challenge-based security model contribute to lower transaction costs, making Optimistic Rollups an attractive option for frequent transactions.
  • Compatibility: Optimistic Rollups are generally compatible with existing smart contracts and decentralized applications (dApps), enabling seamless integration with the Ethereum ecosystem.

The challenge-based security mechanism provides a balance between speed and security, with the risk of invalid transactions mitigated by the challenge period. This approach makes Optimistic Rollups well-suited for a variety of applications, including DeFi, gaming, and other blockchain use cases where scalability and cost efficiency are essential.

How do rollups work?

Rollups are designed to work with the existing blockchain infrastructure while addressing scalability concerns. This approach involves a complex interplay between off-chain processing and on-chain validation, with key roles played by operators, validators, and sequencers.

Here's an overview of each's role:

Operators and Validators

Operators and validators work together to manage the off-chain transactions in rollups.

  • Operators are responsible for aggregating individual transactions into a batch or "rollup." Transaction execution occurs off-chain, and once the batch is ready, operators submit it to the main network as a single transaction. In optimistic rollups, this involves creating a "state root" or summary of the rollup's state, while in ZK-Rollups, it involves generating a "zero-knowledge proof" to validate the batch.
  • Validators play a pivotal role in ensuring the integrity of rollup solutions. In optimistic rollups, validators monitor the rollups submitted by operators and have the authority to challenge invalid transactions. In ZK-Rollups, validators verify the ZK proof to confirm the validity of the rollup without accessing the underlying transaction data.


Sequencers are responsible for determining the order in which transactions are processed. They collect and arrange transactions from users to create the rollup batch according to this sequence.

This role is critical because the batch order can affect the rollup's chances of executing transactions and smart contracts. It can also influence the final state of the rollup, and the resulting state root or zero-knowledge proof.

Centralized vs. decentralized sequencers

Sequencers can be centralized or decentralized, depending on the rollup architecture. Centralized sequencers can process transactions quickly but may introduce certain centralization risks. Decentralized sequencers offer a more secure approach, reducing the risk of single points of failure or manipulation.

Challenge period

The challenge period is a critical component of optimistic rollup networks, providing a mechanism for dispute resolution and ensuring the validity of transactions.

  • Purpose: The challenge period allows validators and users to challenge transactions they believe to be invalid, acting as a safety net to prevent invalid or fraudulent transactions from being permanently recorded on the main blockchain. If a challenge is successful, the invalid transaction can be reverted, maintaining the integrity of the rollup.
  • Length: The duration can vary, typically ranging from a few hours to a few days. A longer challenge period provides more time for dispute resolution but may slow down the finalization of rollups, while a shorter challenge window can increase throughput but may reduce the chances to detect invalid transactions.
  • Security and decentralization: During the designated challenge window, anyone can submit evidence to challenge a transaction. This open approach helps ensure that the rollup process remains secure, transparent, and decentralized. Operators that submit incorrect transactions may face penalties, incentivizing actors to act honestly.

By allowing for transaction verification after the fact, optimistic rollup protocols create a flexible and scalable system without compromising the core principles of blockchain security.

Benefits of rollups

Rollups offer several benefits that make them a potential solution for blockchain scalability:

  • Reduced congestion: By moving transactions off-chain and submitting them in batches, rollups help reduce on-chain congestion and increase scalability. This could lead to a smoother user experience, increased transaction throughput, and faster processing.
  • Lower fees: Rollups can lower on-chain congestion, helping to reduce transaction costs. This makes blockchain applications more accessible and cost-effective for users.
  • Enhanced privacy: Zero knowledge rollups, in particular, offer enhanced privacy due to their use of ZK proofs. This technology allows for transaction verification without revealing transaction data and other sensitive information.
  • Data efficiency: Rollup protocols can store transaction data off-chain, reducing the load on the main blockchain. This data efficiency contributes to lower storage requirements and improved scalability.
  • Smart contract compatibility: Rollups are designed to work with existing smart contracts and decentralized applications (dApps), ensuring compatibility with the broader blockchain ecosystem.

Limitations of rollups

Despite their benefits, rollup scaling solutions have some limitations and challenges that need to be considered:

  • Data availability: In optimistic rollups, data storage is a potential concern because transactions are posted off-chain. If this data is lost or unavailable, it can lead to security risks and unwanted transaction reversals.
  • Exit fraud risks: Optimistic Rollups carry the risk of exit fraud, where a malicious operator attempts to withdraw funds fraudulently. The challenge period helps mitigate this risk, but it's not always fraud-proof.
  • Security assumptions: Rollups rely on various security assumptions, such as the honesty of operators and validators. If these assumptions are incorrect, it can lead to security vulnerabilities.
  • Security trade-offs: ZK-Rollups and optimistic rollups have different security trade-offs. ZK-Rollups offer enhanced security but require more complex cryptographic computations, while optimistic rollups are more straightforward but require a challenge period.
  • User experience: Rollups introduce complexity, which can affect the user experience, especially for beginners. Users must understand how rollups work and the associated risks to avoid potential confusion.
  • Adoption barriers: Widespread adoption of rollups may face challenges due to interoperability issues and the need for changes in deployed smart contracts and applications.

ZK-Rollups vs. Optimistic Rollups

Let's compare ZK-Rollups and Optimistic Rollups to understand their key differences:

A table showing the differences between ZK-rollups and Optimistic rollups

Overall, while ZK-Rollups focus on security and privacy, Optimistic Rollups prioritize scalability and compatibility with existing blockchain infrastructure. Both types of rollups are critical to the ongoing efforts to scale blockchain networks, and they will continue to play a significant role in the evolution of decentralized technologies.

Examples of blockchain rollups

Here are some rollup examples that are common in the blockchain space:

Arbitrum (Optimistic Rollup)

Arbitrum logo

Arbitrum is an optimistic rollup designed for a scalable and compatible solution in Ethereum-based smart contracts. Key features of Arbitrum include high throughput, lower transaction costs, and seamless compatibility with existing Ethereum smart contracts.

Optimism (Optimistic Rollup)

Optimisim logo

Optimism is another optimistic rollup designed to improve Ethereum's scalability while maintaining compatibility with existing applications. Optimism places a strong emphasis on compatibility with Ethereum, allowing developers to deploy existing smart contracts with minimal changes.

Base (Optimistic Rollup)

Base logo

Base is a relatively new optimistic rollup designed by Coinbase to provide a scalable and user-friendly platform for decentralized applications. Base Chain aims to lower entry barriers for developers by providing a seamless development experience and interoperability with Ethereum.

StarkNet (ZK-Rollup)

StarkNet logo

StarkNet is a ZK-Rollup that uses zero-knowledge proofs to ensure high throughput and efficient blockchain scalability. StarkNet is built by StarkWare, a company known for zero-knowledge technology solutions. StarkNet's design allows for general-purpose computation, enabling developers to deploy complex smart contracts and dApps.

zkSync (ZK-Rollup)

zkSync logo

zkSync is a ZK-Rollup that aims to provide fast and low-cost transactions while ensuring security, privacy, and scalability. zkSync focuses on usability, aiming to make ZK-Rollups accessible to Ethereum developers and users, while offering tools like account abstraction and native support for ERC-20 tokens.

Other blockchain rollups

Additional rollup providers include Polygon zkEVM, Loopring, Immutable, and more. Each rollup has unique features and caters to specific use cases, contributing to the ongoing development and diversification of the Ethereum blockchain space.

Blockchain rollups vs other scaling solutions

Although Optimistic and Zero Knowledge rollups are quite popular, they are not the only solutions available for blockchain scaling. Here are a few alternative options.

Sidechains vs. Rollups

Sidechains are Layer-2 scaling solutions that operate as separate blockchains connected to the underlying blockchain via a bridge, allowing them to have their own consensus mechanisms and governance structures. Rollups, on the other hand, rely on the structure and security of the mainnet while processing transactions off-chain.

This distinction makes rollups generally more integrated with the principal blockchain, while sidechains offer more flexibility in design and governance.

Examples of sidechains include:

Plasma chains vs. Rollups

Plasma chains are another Layer-2 scaling solution that involve creating child chains connected to the Ethereum mainnet. Transactions are processed off-chain, with a mechanism to settle disputes on the main Ethereum blockchain.

Plasma was an early scaling solution by Vitalik Buterin, with its whitepaper dating back to 2017. However, it has limitations in terms of complexity and user experience, while rollup protocols offer simpler implementations and greater compatibility with existing Ethereum applications.

State channels vs. Rollups

State channels are Layer-2 solutions that enable off-chain transactions by establishing a direct channel between participants. This allows for instant and low-cost transactions, but requires participants to remain online and active during the channel's lifespan.

An infographic showing state channels in blockchain
(*9MNhEiH5r8wpxAZnp_MF-Q.png) (Image source)

On the other hand, rollups provide a more scalable solution by processing many transactions off-chain and then settling them on-chain. Rollups offer a more flexible approach, as they don't require constant participant engagement, making them suitable for a broader range of use cases.

Examples of state channels include:

Regulatory status of blockchain rollups

The regulatory landscape for blockchain rollups is constantly evolving. Here's a broad overview of some aspects for rollup operators and users to consider:

Legal implications

The legal implications of rollup implementations depend on their specific use cases and operational structures. Some rollups may be subject to securities laws if they are used to issue tokens that represent investment contracts or other financial instruments. Additionally, rollup operators must ensure compliance with data protection and privacy laws.

Compliance requirements

Rollup operators must meet various compliance standards, including Anti-Money Laundering (AML), Know Your Customer (KYC), and transaction monitoring. Security is paramount to safeguard against fraud and unauthorized access, requiring robust systems and protocols.

Regulatory trends

Regulators are focusing more on blockchain technologies due to their impact on financial markets and the broader economy. Regulatory trends include increased transparency, greater oversight of decentralized finance (DeFi), and stricter enforcement of existing laws.

Legal, compliance, and regulatory requirements vary by jurisdiction, so rollup operators should stay informed about local laws and work with legal counsel to ensure proper compliance with securities laws and other regulations.

The future of blockchain rollups

Although it is fairly new, rollup technology is rapidly evolving, with new innovations emerging to enhance scalability, security, and interoperability.

Rollups are expected to integrate closely with Ethereum 2.0, which could further enhance their scalability and efficiency with the Ethereum Merge's introduction of Proof-of-Stake (PoS) and sharding. Additionally, rollups may benefit from other Ethereum upgrades, such as EIP-4844 (proto-danksharding), which aims to improve data availability and reduce transaction costs.

As rollup technology matures, it is poised to play a critical role in the mass adoption of blockchain by addressing scalability and cost concerns. By enabling transactions with high throughput and low gas fees, rollups can support a wide range of applications and use cases, from DeFi and NFTs to gaming, social networks, and beyond.

Start using rollups today

MoonPay makes it easier to acquire tokens supported by many blockchain rollup solutions, using a credit card, bank transfer, Apple Pay, Google Pay, and many other payment methods

Our crypto on-ramp allows users to quickly access rollup protocols and bypass the extra steps of using a cross-chain bridge to swap to Layer-2 tokens.

With MoonPay, you can use a card to buy Ethereum and USDC on Optimism, zkSync, Base, and Arbitrum, and send the tokens directly to your crypto wallet. MoonPay also supports purchases for native tokens of rollup services like IMX and Loopring.

Just enter the amount of crypto you wish to purchase and follow the steps to complete your order.

Corey Barchat
Written byCorey Barchat

You might also like