Do Quests,
Earn Gems
Home
Arrow icon
Blog
Arrow icon
Blockchain
10/19/2023

Zero-Knowledge vs. Optimistic Rollups Explained: Which One is Better for Blockchain Games?

White text against a dark background with purple accents reads "Rollups Explained: Zero-knowledge vs. Optimistic"
Icon with concentric circles
TL;DR

Like many other Layer 1 blockchain networks, Ethereum has long battled scalability challenges. Much of this can be attributed to the network’s linear processing of transactions. When there's high traffic, these networks become congested, resulting in long transaction times and increased transaction fees.  

For many industries, these challenges have rendered blockchains unusable. To combat these challenges, developers are laser-focused on designing blockchain scaling solutions that enhance speed, increase throughput, and reduce transaction costs, ensuring that blockchains can meet the high demands of modern digital ecosystems.

Among these solutions, rollups have emerged as one of the most promising innovations. In this article, we compare two different rollup approaches: Optimistic vs. Zero-Knowledge (zk). We argue that while Optimistic rollups can be suitable in some select use-cases, ZK rollups are the superior option when it comes to web3 gaming.

What Are Blockchain Rollups?

Blockchain rollups are ‘layer 2’ scaling solutions designed to increase the transaction throughput of a blockchain network. "Rollups" aptly describe their function, bundling multiple transactions into batches off-chain before processing them as a single transaction on the mainnet.

As a result, the mainnet doesn't have to process each individual transaction but simply validates the single proof, thereby considerably reducing the data stored on-chain and enhancing the network's overall capacity. This directly translates into greater speed and lower costs for the end users. 

But not all rollups are created equal. Much of the difference lies in the type of cryptographic proofs used to validate transactions before pushing them onto the mainnet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

What Are the Different Types of Blockchain Rollups? 

Rollups can be broadly classified into two types based on their proof methods: optimistic rollups and zero-knowledge rollups.

Optimistic Rollups

Optimistic rollups operate on the premise that all transactions are valid unless proven otherwise. If a transaction's validity is questioned, validators need to produce a fraud proof, which is then sent to the main network for verification. If found invalid, the transaction is reverted. This method relies on the network's participants to keep each other honest, creating a balance of trust and vigilance.

However, this method also comes with drawbacks. When users present fraud proofs, the resolution on the mainnet isn't immediate. This may lead to delays when withdrawing assets from the rollup chain, with waiting periods spanning from several days to even weeks.

Zero-Knowledge Rollups

Unlike optimistic rollups, zero-knowledge rollups (ZK-rollups) employ zero-knowledge proofs (also known as validity proofs), a cryptographic method where one party can prove to another that a given statement is true, without revealing any specific information about that statement. In the context of blockchain, this means proving the validity of a transaction without revealing the details of the transaction itself. This ensures immediate finality, eliminating the waiting periods associated with fraud proofs in optimistic rollups. 

Given that the specifics of transactions are not disclosed on the mainnet, users gain an additional layer of privacy. Fabricating a deceptive zero-knowledge proof to mislead the network is also an exceptionally difficult task, leaving ZK-rollups nearly impervious to hacks.

Comparing The Differences Between Optimistic and ZK-rollups

To better grasp the nuances between optimistic and ZK-rollups, consider this analogy:

You have two delivery services: The Optimistic Delivery Service and the Zero-Knowledge Delivery Service. 

Optimistic Delivery Service: This service is confident about its delivery process. Whenever they drop a package at your door, they're sure it's exactly what you ordered and is in mint condition. However, they operate transparently: each package comes with a clear label on the outside detailing its contents. If there’s an issue—say you find that the package's contents don't match its label—they’ll make amends. But this means returning to their distribution center, checking the problem, and sending the correct item back to you. All these steps can introduce delays.

Zero-Knowledge Delivery Service: This service operates differently. They never list the contents of the package on the label. Instead, before delivery, they employ an advanced scanner in their facility to verify the package's contents against the order, ensuring it's accurate and intact. They can vouch for the contents being correct without actually revealing what’s inside to anyone else. Once they’re sure it's right, they deliver it straight to your doorstep, ensuring quick service without compromising on the privacy of your order's details.

In this analogy, the Optimistic Delivery's transparent labeling represents the open transaction details in optimistic rollups, and the Zero-Knowledge Delivery's scanner embodies the ZK-proof method ensuring transaction validity without revealing its specifics. 

While both options are useful in their own right,  ZK-rollups are favored for their security, speed, and transparency. Whereas Optimistic rollups leave all transaction details plainly visible on the rollup chain, ZK-rollups ensure all transactions are verified while keeping transaction details completely private. Not only does this enhance security, but it offers a higher degree of privacy that is much appreciated by all users. ZK-rollups also offer near-immediate transaction validations, making them incomparable to optimistic rollups in terms of speed. 

Let’s explore how these different options match up when it comes to building web3 games.

Optimistic Rollups Are Not Optimized for Gaming

Fraud proofs assume that all transactions are valid until proven otherwise. This means that there is a challenge period during which anyone can challenge the validity of a transaction. If a challenge is successful, the transaction is rolled back and the challenger is rewarded.

The challenge period for optimistic rollups is typically quite long, ranging from 3 to 14 days. This is necessary to ensure that the system is secure and that there is enough time to detect and challenge any fraudulent transactions. However, this long challenge period also means that users cannot immediately withdraw funds from an optimistic rollup back to layer 1 or to another chain.

This is not as much of a problem for decentralized finance (DeFi) applications, as the tokens that users want to withdraw are fungible. This means that users can get someone to take on the risk of giving them the tokens early on layer 1, and they only get tokens which are in the process of being withdrawn when the fraud period is over and the tokens are actually withdrawn. They can get paid for taking this risk, so it’s not disastrous and users can have “fast withdrawals”.

However, this system does not work for web3 gaming, as NFTs are unique and non-fungible. There is no way for a fast withdrawal lender to give a user their NFT on layer 1 early, as it is non-fungible. Therefore, while Optimistic rollups can make sense for specific use-cases such as DeFi, they are not suitable when it comes to the unique demands for games.

ZK-rollups Will Become The Gold Standard for Gaming

While ZK-rollups are more difficult to develop than Optimistic rollups, they offer a number of key advantages when it comes to both the building process and end-user experience. Arguably, these advantages make it far superior to Optimistic rollups when it comes to gaming.

Firstly, ZK-rollups can offer instant finality, meaning that users can immediately withdraw funds from a zero-knowledge rollup back to layer 1 or to another chain. This is a critical advantage for web3 gaming, as it provides players with a seamless and user-friendly experience. Users can withdraw their NFTs from a zero-knowledge rollup immediately after making a purchase, and they can also use their NFTs to interact with other games and applications on layer 1 and other chains.

Unlike Optimistic rollups where players may grapple with extended delays when withdrawing in-game currency, and potential security concerns, ZK-rollups offer the speed, security, and transparency needed to preserve the dynamism of robust in-game economies capable of processing hundreds of millions of daily transactions.  

Additionally, as we expect to see bigger and more complex web3 games approaching mainstream scale, the need for a system that can accommodate multiple rollups will become crucial. The limitations of optimistic rollups will compound; the only way to avoid this is by building on ZK-rollups, such as Immutable ZKEVM.

Immutable ZKEVM powered by Polygon, is the holy grail of ZK-rollups. Designed specifically for gaming, Immutable ZKEVM offers EVM compatibility, low cost, massive scale, and enterprise-grade security, all while offering access to the entire suite of Immutable gaming products

Now, gaming studios venturing into blockchain can focus on what they do best: crafting captivating and immersive games. Immutable ZKEVM handles the rest, providing both developers and users alike with custom smart contract support, advanced gameplay mechanics and tokenomics, and a seamless trading experience. 

Overall, ZK-rollups offer instant finality, higher scalability, lower fees, and increased privacy. As web3 gaming goes mainstream, ZK-rollups will play a critical role in providing a seamless and user-friendly experience for gamers and prove ultimately to be the clear choice when it comes to scaling technology.

If you’re looking for a blockchain built for gaming, your search ends here. Get in touch with us today to learn more.

Click here to learn more about Immutable zkEVM, the gold standard for Ethereum gaming.

Still need help?
Contact our support team directly
Disclaimer and risk statement:

This ‘How to’ guide is provided for information purposes only and does not constitute investment advice or a recommendation.  While Immutable has taken all reasonable care in preparing this guide, it is provided on an “As is” basis without any representations or warranty, to the maximum extent permitted by applicable law. In no event shall Immutable or any of its affiliates or any of its directors, officers, agents or employees be liable for any loss or damages in connection with the use of this guide. Some of the solutions referred to in this guide are provided by third parties; Immutable takes no responsibility for third party technology and you should refer to the policies, terms and conditions of those third party services before engaging with them.  Dealing in crypto assets can be complex; you should be aware of the risks involved with dealing with crypto assets, including with respect to transferring and bridging assets across different blockchain environments.

Blockchain
Join the Immutable Newsletter

Be the first to receive Immutable updates, announcements and more.

$IMX Token Address
The official $IMX token address is: