0%
Overview page background
HomeOverviewsLayer 2
Polygon ZK Rollups: Everything You Need to Know

Polygon ZK Rollups: Everything You Need to Know

Alchemy headshot

Written by Alchemy

Brady Werkheiser headshot

Reviewed by Brady Werkheiser

Published on 2022-05-187 min read

Polygon (formerly MATIC Network) is a Web3 startup that builds products to scale Ethereum and encourage mass adoption. 

The company's core product, the Polygon proof of stake (PoS) sidechain, has become a popular alternative to Ethereum due to its low fees and faster transactions.

Currently, Polygon is developing a suite of zero-knowledge rollups (ZK rollups) to increase throughput on Ethereum without sacrificing decentralization or security. ZK rollups process transactions off-chain and reduce computation on the base layer to achieve scalability. 

This guide will explain how Polygon ZK rollups work and what benefits they offer. We’ll also consider different Polygon ZK rollup solutions and compare them with existing ZK rollups. 

What is a Polygon ZK rollup?

A Polygon zero-knowledge rollup is a scaling solution that aggregates multiple off-chain transactions into a single on-chain transaction. The Polygon ZK rollup scheme eliminates the need for miners on the Ethereum Mainnet to verify individual transactions by generating a validity proof (or zero-knowledge proof) for every rollup. 

Because validity proofs are mathematically provable, the Ethereum network can trustlessly verify the authenticity of batched transactions. This improves the security of rollups, as malicious activity is much harder to pull off. 

More importantly, validity proofs (or zero-knowledge proofs) enable the immediate confirmation of rollup transactions on the main chain. Users can move funds seamlessly between the rollup and the base blockchain (Ethereum) without experiencing friction or delays. 

In contrast, Optimistic rollups (used by Optimism and Arbitrum) impose a waiting period before users can withdraw funds. This limits the efficiency of rollups and reduces the value for users.

The Polygon network has previously reiterated its commitment to scaling Ethereum via ZK rollups and plans to invest over $1 billion in zero-knowledge technology. At least four products in Polygon’s stack are based on ZK rollups, including Zero, Hermez, Miden, and Nightfall. 

In the next section, we review each Polygon ZK rollup solution and explain what it offers. 

What is Polygon Zero?

Polygon Zero is a ZK rollup solution specifically designed to reduce the computational cost of generating validity proofs. While ZK rollups can indeed increase scalability, their functionality is limited due to the time-intensive and costly proof-generation process. 

Polygon Zero solves this problem by using “recursive proofs”, which are faster than existing prover systems. These recursive proofs come from Plonky2, a proving mechanism developed by the team behind Mir Protocol. 

Mir Protocol was a project exploring recursive ZK proofs to scale decentralized applications (dApps) until the team's acquisition by Polygon. Mir Protocol’s core team continued to work on scalable proofs, leading to the launch of Plonky2 early in January 2022.

Source: Polygon
Source: Polygon

Recursive proof systems work differently from existing ZK prover mechanisms. With existing projects, the idea is to generate proofs one batch of transactions at a time. However, this can take a lot of time. 

Polygon Zero adopts a different approach by generating proofs simultaneously for every transaction in the batch. Then the machine aggregates multiple transaction proofs into a single proof submitted on the Ethereum network. 

This mechanism significantly reduces the effort it takes to generate reliable validity proofs for transaction rollups. Polygon Zero’s Plonky2 can generate a recursive proof in 0.17 seconds, making it arguably the fastest ZK proof-generation scheme today. 

Polygon Zero is designed to be compatible with the Ethereum Virtual Machine (EVM) and can batch up to 3,000 transactions per block. Although Polygon Zero is yet to go live, further breakthroughs in cryptography research may position it as the dominant ZK rollup project in the Ethereum ecosystem. 

What is Polygon Hermez?

Polygon Hermez is a ZK rollup project with decentralization as the main objective, and it is reputedly the only decentralized ZK rollup operating atop the Ethereum network. 

The Hermez network uses a novel consensus algorithm, called proof of efficiency (PoE), to ensure decentralization and network security. This system consists of Sequencers and Aggregators, who collectively ensure the rollup’s functionality. Sequencers accept transactions and include them in a batch, while Aggregators generate ZK proofs to be submitted to Ethereum. 

In the PoE system, anyone can become a Sequencer or Aggregator, and there are built-in cryptoeconomic incentives to encourage honest behavior. This protects Polygon Hermez from centralization problems that plague ZK rollups, and also reduces the chances of malicious activity on the network. 

Source: Polygon
Source: Polygon

The Hermez protocol achieves considerable throughput by using tested-and-true zero-knowledge technology. It can include up to 2,000 transactions in one batch and generates SNARK (Succinct Non-Interactive Argument of Knowledge) proofs to confirm the validity of transactions in each rollup. 

Polygon Hermez 2.0

While Polygon Hermez has been active since 2021, usage has remained low. Hermez lacks EVM compatibility, so functionality is limited to simple token transfers and atomic swaps. 

But Polygon has announced plans to bring EVM compatibility to Hermez in the future. The project, dubbed “Hermez 2.0” will see the introduction of a zero-knowledge EVM (zkEVM) that combines the existing ZK rollup with an EVM implementation. 

With Hermez 2.0, Polygon can make good on its promise to scale Ethereum through ZK rollups. Already, the Polygon Hermez team plans to use machine instructions (opcodes) native to the EVM. This will make it easy for projects to port Ethereum-based dApps to Polygon Hermez or launch EVM-compatible dApps directly on the rollup. 

What is Polygon Miden?

Polygon Miden is a general-purpose, STARK-based ZK rollup with EVM compatibility. STARK (Scalable Transparent Argument of Knowledge) is a type of cryptographic proof with similarities to the more popular SNARK system. 

Some consider ZK-STARKs better than ZK-SNARKs because the former doesn't need a trusted setup, and can deter quantum-computing attacks. The downside is that STARKs require larger proofs, making them more expensive to use. 

As an EVM-compatible ZK rollup, Polygon Miden is fairly unique. Other STARK-based ZK rollups (most notably StarkNet) cannot support Solidity smart contracts, limiting their value to Ethereum users. 

Polygon Miden relies on the Miden Virtual Machine (VM) to execute arbitrary logic and run smart contracts. Developers can easily compile code written in Solidity or Vyper into Miden Assembly, the language used for programming machine instructions in the Miden VM. 

Polygon Miden can process up to 5,000 transactions in a single block, with new blocks produced every five seconds.  Although this ZK rollup exists as a prototype for now, it is expected to boost throughput to over 1,000 transactions per second (TPS) at launch. 

Source: Polygon
Source: Polygon

What is Polygon Nightfall?

Polygon Nightfall is an enterprise rollup solution developed to facilitate private transactions for institutions that launched on the Ethereum Mainnet on May 17th, 2022. The project is the result of a collaboration between Polygon Technology and corporate giant Ernst & Young (EY). 

Polygon Nightfall uses a unique rollup design that combines Optimistic rollups and zero-knowledge cryptography. Using Optimistic rollups lowers transaction costs, while ZK technology protects transactions from prying eyes. 

For large-scale companies looking for scalable and private blockchain transactions, Polygon Nightfall offers a compelling use case. 

Nightfall is still in production, although the Polygon team recently announced the launch of a beta version on Ethereum Mainnet. The ZK rollup's architecture relies on the following components:

Nightfall Contracts

Nightfall Contracts are smart contracts that govern activity on the L2 chain. They also manage the Block Proposer system and are responsible for selecting, rotating, and evicting Block Proposers. 

Block Proposers

These are nodes responsible for validating and rolling up transactions into batches and then submitting them to the L1 blockchain. 

Challengers

Challengers are nodes selected to ensure honest behavior among Block Proposers. Challengers can create fraud proofs and submit the same on-chain to challenge invalid blocks. 

Liquidity Providers

Liquidity Providers (LPs) monitor the L2 chain and provide liquidity for users who wish to withdraw to Ethereum. LPs are critical to Polygon Nightfall’s operation, as it solves the problem of delayed withdrawals that affect other Optimistic rollup systems. 

Source: Polygon
Source: Polygon

Polygon Nightfall facilitates the secure and privacy-protecting exchange of ERC-20, ERC-1155, and ERC-777 tokens. With an estimated 100 TPS rate, Nightfall works well for enterprise clients wanting to transact quickly and privately on Ethereum.

How do Polygon ZK rollups differ from other zero-knowledge rollups?

Polygon ZK rollups are different from other zero-knowledge rollup designs in terms of speed, cost, and the ability to support EVM-compatible computation. 

Polygon ZK rollups are faster 

A drawback associated with traditional ZK rollups, like StarkNet or zkSync, is the computational cost of generating validity proofs. Often, inefficiencies in proving mechanisms offset the benefits of ZK rollups. 

Conversely, Polygon ZK rollups are designed to shrink the computational cost of creating proofs. One of Polygon's ZK rollup, Polygon Zero (using Plonky2), can generate recursive ZK proofs in 170 milliseconds. 

Polygon ZK rollups are EVM-compatible 

While zkSync recently released a zero-knowledge EVM implementation, most ZK rollups are incompatible with Ethereum. For instance, using StarkNet requires learning Cairo, a Turing-complete language for executing programs in the StarkNet OS. 

The implication is that these systems cannot extend Ethereum's capabilities as Polygon's ZK rollups do. Users cannot access Ethereum-based dApps on such ZK rollups, while developers cannot effectively harness the network effects of Ethereum.

Polygon ZK rollups are cheaper to use 

Polygon's zero-knowledge rollup stack is designed to minimize the costs involved with using L2s. ZK rollups often attract criticism because generating validity proofs requires expensive, specialized hardware—with these costs passed on to users. 

Polygon ZK rollups, like Polygon Zero, aim to simplify proving schemes—which would allow even lower devices to participate. For instance, testing for the Plonky2 proof generation was carried out on a consumer-grade PC. 

Moreover, Polygon ZK roll ups offer smaller proof sizes than other ZK prover mechanisms. Plonky2, mentioned earlier, can generate proofs as small as 45kb. Not only does this eliminate hardware centralization, but it reduces cost burdens on end-users. 

Why are Polygon ZK rollups important?

Polygon ZK rollups are important because of their scalability, lower transaction fees, and security.

1. Scalability 

Zero-knowledge rollups are a big part of the drive to scale Ethereum whilst preserving decentralization and security. ZK-rollups, like Polygon Zero and Polygon Hermez, can boost throughput to thousands of transactions per second. 

2. Low transaction fees 

Exorbitant gas fees have been the major sticking point for Ethereum users. By taking transactions off the main chain and decongesting the network, Polygon ZK rollups can massively lower Ethereum's transaction fees. 

3. Security 

ZK rollups are based on solid cryptography and have a higher security threshold than other rollup designs. Instead of relying on economic incentives or trust assumptions, like Optimistic rollups, ZK rollups rely on cryptographic guarantees to ensure network security. 

Polygon ZK rollups post transaction data on Ethereum, so users can rely on Ethereum to enforce transactions conducted on the Layer 2 (L2) chain. For this reason, ZK rollups are among the most preferred solutions to Ethereum’s scalability woes. 

4. Innovation 

Ethereum's limitations in terms of scalability can limit what developers can achieve. With gains in processing capacity from implementing Polygon ZK rollups, Ethereum developers are likely to find new use cases and expand into new areas. 

Conclusion

Zero-knowledge rollups are among the most-lauded solutions to Ethereum's scalability issues. With Polygon's commitment to integrating ZK rollups, the possibility of scaling Ethereum increases. 

Polygon ZK rollups have the potential to massively increase Ethereum’s processing capabilities and bolster mass adoption. Alchemy is committed to scaling Ethereum and offers support for developers building on Polygon.

Overview cards background graphic
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key