ELI5 Blockchain Rollups: Optimistic and Zero-Knowledge

ELI5 Blockchain Rollups: Optimistic and Zero-Knowledge

What's the difference between optimistic and zk rollups? What is a blockchain rollup? All your rollup questions and more answered!

By Marcus E

5 min read

What is a Blockchain Rollup?

A blockchain rollup is a Layer 2 (L2) solution for Ethereum that aims to increase transaction volume and speed without increasing gas fees. It works by processing transactions off-chain, bundling and compressing them into a single "rollup", then posting them to Ethereum, often referred to as Layer 1 (L1). 

On a Layer 2, the gas fee is distributed across the users sending transactions in the rollup, resulting in reduced costs. By posting the bundled transactions to Ethereum, the rollup inherits the security from Ethereum, as reversing the rollup transaction would require reversing Ethereum. There are two types of rollups, Optimistic and Zero-Knowledge (ZK), which differ in the process used to validate off-chain transactions to prevent fraud.

How do Blockchain Rollups work?

When a user initiates a transaction on a Blockchain Rollup such as zkSync or Optimism, the operator, which is a node or the system component in charge of transaction processing, takes over. The operator's primary duty is to bundle these transactions, compress them, and send the compressed block to the Ethereum network. While the process is utilized by both the Optimistic and ZK rollups, they differ in the way they handle transaction validation.

What is an Optimistic Blockchain Rollup?

Optimistic rollups work on the optimistic assumption that all transactions in a rollup batch are valid unless they receive a fraud-proof that challenges their validity within a week. This reduces processing time considerably. 

The system for challenging fraudulent transactions works like this: network participants have a set period, usually a week, during which they can submit a fraud-proof to contest the validity of transactions. If a fraudulent transaction is confirmed, the batch of transactions is reverted. The rollup will re-execute the batch of transactions, excluding the fraudulent transaction, and the operator responsible for including the invalid transaction will have their stake penalized. 

While the Optimistic rollup solution greatly increases transaction speed, one drawback is the period to withdraw your assets, which often lasts around a week on popular networks like Optimism or Arbitrum.

What is a Zero-Knowledge Blockchain Rollup?

Zero-Knowledge rollups (ZK-rollups) use a complex cryptographic technique called Zero-Knowledge proof to validate the authenticity of a transaction with minimal information, maintaining privacy and efficiency. 

Unlike optimistic blockchain rollups, ZK-rollups use a proof of validity, known as a Zero-Knowledge or ZK proof, which is presented to the blockchain for every batch of transactions. This allows for faster transaction validation and reduces withdrawal delays. ZK-rollups perform better than Optimistic rollups in terms of speed and security, but are substantially more complex. 

Traditionally, ZK-rollups have been application-specific, tailored to specific use cases such as non-fungible token swaps or transferring crypto between addresses. However, developments in cryptography have enabled teams such as Polygon, Matter Labs, and Scroll to create the first zkEVMs – ZK-rollups that are compatible with Ethereum's mainnet. These newer EVM-compatible ZK-rollups assure that they will work with almost any application that developers want to build on Ethereum.

Optimistic Blockchains

Optimism Network

Optimism is an optimistic layer 2 chain that works in tandem with the core Ethereum network. Transactions occur within Optimism, but for authentication and safety purposes, the information associated with these transactions is posted back to the mainnet and confirmed. This process of establishing transactional authenticity is called a fraud proof, and Optimism reimburses the computational fees related with this process. Additionally, to ensure continuity and simplicity, your Optimism address remains the same as your Ethereum mainnet address. This seamless integration maximizes efficiency and scalability in the Ethereum ecosystem.

Bridge to Optimism using Enkrypt

Base Network

Base is a new Layer 2 blockchain solution designed to increase Ethereum's network capabilities. Its goal is to build a more efficient, scalable, and affordable platform for decentralized applications (dApps). Base was created by Coinbase, one of the industry's largest and most reputable cryptocurrency exchanges. Base is built using the OP Stack in collaboration with Optimism. The OP Stack is a standardized, shared, open-source development stack designed for creating Layer 2 blockchains. The Optimism Collective maintains the OP Stack, which powers the Optimism network, Zora Network, Farcaster and opBNB. 

Bridge to Base using MEW Mobile and Enkrypt

Arbitrum Network

Arbitrum is an optimistic layer 2 chain that aims to improve the functionality of Ethereum smart contracts by increasing their speed, scalability, and privacy. The technology enables developers to run unmodified Ethereum Virtual Machine (EVM) contracts and Ethereum transactions on this blockchain while retaining the security features of Ethereum's base layer. Arbitrum was intended to address some of the shortcomings of existing Ethereum-based smart contracts, such as inefficiency and excessive gas fees. It uses optimistic rollups and places the transaction information as calldata on the main Ethereum network. This solution reduces transaction costs for end users by distributing Ethereum transaction fees across all transactions on Arbitrum.

Bridge to Arbitrum using MEW Mobile and Enkrypt.

Zero-Knowledge Blockchains

zkSync

Matter Labs created zkSync, a ZK layer 2 chain specifically designed to improve the scalability of the Ethereum blockchain through the use of ZK rollup technology. It first appeared in June 2020 with the release of zkSync 1.0, which did not initially support smart contracts. The second release of zkSync 2.0 in October 2022 brought substantial improvements, including support for EVM compatibility and smart contracts. While the original zkSync used a proprietary programming language called Zinc, zkSync 2.0 was improved to compile code written in not only Solidity, the primary Ethereum code language, but also Rust, Yul, and Vyper. As of February 2023, zkSync 1.0 was renamed to zkSync Lite and 2.0 was renamed to zkSync Era, respectively.

Bridge to zkSync Era using MEW Mobile and Enkrypt

Polygon zkEVM

Polygon zkEVM is a ZK layer 2 chain built for Ethereum that uses ZK proofs while maintaining EVM equivalency. This keeps Ethereum's coding environment, tools, applications, and other features while improving speed and lowering transaction fees. Developers with existing contracts can deploy them on Polygon zkEVM, allowing users to deposit assets from Ethereum and perform transactions with substantially lower gas costs. A zero-knowledge proof confirms the authenticity of each transaction by combining them into batches, giving Polygon zkEVM an optimal blend of interoperability, scalability, and security. 

Use Polygon zkEVM seamlessly in Enkrypt

Aztec Network

The Aztec Network is a zk-rollup system designed to provide a variety of solutions, including programmable, privacy-focused digital assets, identity management, games, and much more. Its core technology utilizes unspent transaction output (UTXO), employing zero-knowledge proofs to secure not only user privacy, but also network scalability. Importantly, it is designed with flexibility and interconnection in mind, enabling the execution of both private and public functions and allowing them to interact conversely. This means that private functions can call both private and public ones, and vice versa, opening up a wide range of possibilities for application development and use.

Scroll

Scroll is a security-focused Layer 2 that aims to improve the capabilities of Ethereum. It primarily focuses on improving security and expanding the system to handle more users efficiently. Scroll achieves this through its approach to scaling architecture and utilization of zero-knowledge proofs, which help maintain transaction privacy.

Bridge to Scroll using Enkrypt

Using Blockchain Rollups

While Optimistic rollups and ZK rollups each have their supporters, the main thing is that they both help improve usability and scalability of crypto for users. With multichain wallets, using Layer 2s and rollups doesn’t have to be confusing: bridging to a different network and swapping on Layer2s happens right in the wallet. Whether you are a fan of using Optimistic or ZK powered networks, you can try them both out on Enkrypt and MEW Mobile!


Download MEW 🌐 | Follow us on Twitter 🐦 | Check out our blog 📰