Home Glossary

Zero-Knowledge Rollups

Beginner
Glossary
Nov 15, 2023

What Are Zero-Knowledge Rollups?

Simply put, zero-knowledge rollups (or ZK-rollups) are a type of scalability solution. They combine multiple transfer proofs into a single transaction that can be instantly verified on multiple blockchain levels. Zero-knowledge rollups are still a fairly new concept, but they can already be found on platforms like StarkNet and zkSync.

A zero-knowledge rollup interacts with multiple levels of a blockchain. The majority of ZK-rollups run on Ethereum, so let's use that as an example. The main Ethereum chain has its benefits, but they often come with high transaction fees and low speeds. Ethereum Layer 2 blockchains use the security of the main chain, while adding additional speed and affordability.

ZK-rollups allow you to create a transaction that works for both layers. Any given ZK- rollup is a transaction that contains multiple zero-knowledge proofs in one bundle. This transaction is a smart contract that can maintain its state on both Layer 2 and Layer 1 of the blockchain. Without getting too deep into details, this essentially means a ZK-rollup verifies information for multiple transactions in multiple places, so it saves time and money.

How Do Zero-Knowledge Rollups Work?

To understand how a zero-knowledge rollup works, we first have to take a look at the concept of zero-knowledge proofs, which are a cryptographic mechanism that lets you prove you have certain information — without actually revealing that information. 

For example, you could prove that you have the password for an account by showing you're logged into the account, instead of listing the actual password. When it comes to crypto, zero-knowledge proofs provide the necessary documentation for transactions. Users can show they have all of the necessary data and authorizations without actually giving that information to other viewers.

Another essential part of the zero-knowledge rollup process is the Merkle tree, a type of mathematical structure that lets blockchains prevent the storage of false data. ZK-rollups have two Merkle trees in their smart contracts. One of the trees stores account data, while the other one stores balances. This allows the rollup to essentially store all necessary information on Layer 1 while storing additional backup information on Layer 2. This reduces the amount of processing power the blockchain needs to handle because the main layer only has to manage a few essential bits of information.

Essentially, when you send a zero-knowledge rollup, you’re bundling multiple Layer 2 proofs into a single transaction, which is then published onto the main blockchain. Instead of having to mine multiple individual transactions, the main chain only has to deal with one validity proof. Verifying the single rollup on Layer 1 allows you to simultaneously verify all the different transactions on Layer 2. The rollup works by only managing small amounts of information on the main chain, while still providing access to verification information on the second layer.

Zero-knowledge Rollups vs Optimistic Rollups

Keep in mind that a ZK-rollup is a little different from an optimistic rollup. Optimistic rollups are another type of scalable and convenient transaction, so they frequently get confused for zero-knowledge rollups. However, from a computational perspective, they’re processed a little differently. Optimistic rollups are also bundles of transactions which are processed on Layer 2 and published on the main chain.

However, they’re not actually proven before publishing. As the name implies, optimistic rollups are optimistically assumed to be valid — unless they’re proven false. The rollup features a dispute period in which users can dispute any possibly invalid transactions. The transactions aren't documented on the main chain until the dispute period is over.

Optimistic rollups do have some uses, but the lack of definitive proof means they aren't as secure as zero-knowledge rollups. A ZK-rollup also tends to be faster than an optimistic rollup. When using an optimistic rollup, you have to wait for the dispute period to pass.

Advantages of Zero-Knowledge Rollups

Zero-knowledge bundles are becoming quite popular because they have several helpful advantages.

Faster Verification Times

One of the big perks of a ZK-rollup is that it's faster. All the transactions are first completed on Layer 2, which is quicker than the main chain. Since these transactions are supported with proofs, they’re verified instantly (once they reach the main chain). These faster times are more convenient for users, and they make Layer 2 scaling a lot more attainable. Especially when dealing with large numbers of transactions, a ZK-rollup is one of your quickest options.

Less Vulnerable to Attacks

Unlike some other bundling systems, zero-knowledge is fairly secure. Since the transactions are confirmed with zero-knowledge proofs, information is validated at multiple stages. This helps keep transactions from being vulnerable to economic attacks.

Decentralized Security

The data that you need to recover your state of transfer is all stored on the main blockchain, so you get maximum decentralization. Especially when working with a blockchain like Ethereum, you can be confident that your transaction is fairly decentralized. This provides additional security when completing your transaction.

More Affordable to Process

The speed and simplicity of processing on Layer 2 of a blockchain results in major savings for users. This is especially true when working on Ethereum and other blockchains, which increase their transaction fees during peak times. A zero-knowledge rollup allows you to handle multiple transactions for only a single fee. Therefore, when working with large chunks of data, you can save a lot of money.

Disadvantages of Zero-Knowledge Rollups

ZK-rollups won't work well in every situation, and there are some potential issues associated with using rollups in certain circumstances.

Lack of EVM Support

Some types of rollups don't have Ethereum virtual machine (EVM) support. This isn't necessarily an issue for certain types of blockchains, but it can cause problems for others. You'll need to take the time to research your blockchain closely before deciding to use ZK-rollups.

High Computational Requirements

The main reason that some people go with (unproven) optimistic rollups is because their mechanism has lower computational requirements. ZK-rollups are more secure, but creating so many zero-knowledge proofs comes at a computational cost. All the extra effort might not be worth it for an application that doesn't have much on-chain activity.

Vulnerability to Operator Influence

The process of creating a zero-knowledge rollup does allow the operator to have some influence over the smart contract. They can alter the order of the transactions which may cause potential issues for some users. This is why it is very important to only use trusted providers when working with any type of zero-knowledge rollup.

Zero-Knowledge Rollups on Ethereum

Though rollups have applications for a lot of blockchains, the majority of zero-knowledge rollups are used when working with Ethereum. ZK-rollups have some specific applications for Ethereum. Though Ethereum is popular for its flexibility, its network can become congested, slow and expensive. ZK-rollups make it easier to expand projects. They allow for more scalability, while still permitting users to access the Ethereum network’s benefits.

There are a variety of projects which focus on applying ZK-rollups to Ethereum. One of the largest is Polygon Hermez (Polygon's zkEVM). This open-source project has invested $1 billion into rollup provider technology. Other popular implementations include dYdX, Loopring and zkSync. These projects can all be integrated into your decentralized applications (DApps) to add more functionality and speed to Ethereum-based projects.

Ultimately, zero-knowledge rollups have a lot of exciting applications for Ethereum and beyond. Their ability to make transactions faster helps solve some scalability issues with blockchains. Though they still aren't very well-known, you’re likely to see more of them in the future.