MoonPay logo
0 minsPublished on 6/4/2024

What are rollups? How blockchain rollups work

Discover how blockchain rollup solutions like ZK-Rollups and Optimistic Rollups are helping to improve 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 rollup?

A 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 blockchain as a single transaction. The two most common 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 the Layer-1 blockchain, rollups can significantly increase a blockchain's capacity to handle more transactions without requiring drastic changes to the core architecture. They have been a particularly useful advancement for decentralized finance (DeFi), gaming, and other applications that require high throughput and low transaction fees.

Main types of blockchain rollups

There are two primary types of blockchain rollups: optimistic rollups and zk-rollups.

Optimistic Rollups

In optimistic rollups, transactions are initially processed off-chain by a designated operator. This operator bundles the transactions into a batched block and submits a cryptographic proof to the main chain, asserting the validity of the multiple transactions. The principal blockchain then confirms the validity proof and publishes the block, finalizing the transactions. If any disputes arise regarding the validity of transactions, optimistic rollups offer a challenge period that allows for resolution on-chain.

ZK-Rollups (Zero-Knowledge Rollups)

ZK-rollups employ advanced cryptographic techniques known as zero-knowledge proofs to ensure transaction validity without revealing sensitive data. In this model, all transaction data is aggregated off-chain, and only succinct validity proofs are submitted to the main blockchain. This approach provides enhanced privacy and scalability while maintaining the security and privacy of the underlying blockchain.

How do rollups work?

Although the specifics may vary by type, rollups generally operate by using a combination of off-network computation and on-chain verification to facilitate efficient transaction processing. Let's examine the detailed mechanics of how rollups function:

Step 1: Transaction aggregation

Rollups begin by aggregating multiple transactions into a single bundle (or batch). This aggregation process allows for the consolidation of transaction data, reducing the volume of information that needs to be processed on the main Layer-1 chain.

Step 2: Off-chain computation

Once transactions are aggregated, rollups utilize off-chain computation to execute smart contracts, validate transactions, and update account balances. They process transactions this way to significantly reduce the computational burden on the principal blockchain, enabling faster transaction throughput and lower fees for users.

Step 3: Data availability

Crucial to the functioning of rollups is the availability of transaction data. Participants in the rollup network must maintain copies of this data to ensure its accessibility and integrity. In the event of data unavailability, mechanisms such as fraud proofs or data availability checks may be employed to mitigate risks and ensure the security of the system.

Step 4: Cryptographic proofs

Once Layer-2 processing is complete, rollups generate cryptographic proofs that attest to the validity and correctness of the transactions. These validity proofs serve as a compact representation of the processed data and are subsequently submitted to the Layer-1 blockchain for verification.

Step 5: Layer-1 verification

Upon receiving the cryptographic proofs, the main chain validates their authenticity and correctness. This verification process involves confirming the validity of transactions, checking for double-spending attempts, and ensuring adherence to the protocol rules.

Step 6: Commitment to main chain

Once verified, the cryptographic proofs are committed to the Layer-1 chain, typically in the form of a transaction or block. This action finalizes the state transitions and updates resulting from the processed transactions, effectively incorporating them into the immutable blockchain ledger.

Step 7: Dispute Resolution (for Optimistic Rollups)

In optimistic rollup implementations, a challenge period follows the submission of cryptographic proofs to the main chain. During this period, participants have the opportunity to dispute the validity of transactions by providing counterproofs or evidence of fraud. This mechanism ensures the integrity of the rollup despite the reliance on off-network processing.

Benefits of rollups

Rollup technology offers several advantages as a potential solution for blockchain scalability:

  • Improved scalability: 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: By lowering on-chain congestion, rollups can help to reduce transaction fees. 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.

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)

Optimism 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.

State channels vs rollups
(Image source)

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 Layer-2 scaling systems 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.

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