Zero-knowledge (ZK) tech is one of the most prominent and promising paths to scaling Ethereum. One popular use of ZK proofs to scale Ethereum is what’s known as a zkEVM (zero-knowledge Ethereum Virtual Machine). So what is a zkEVM, and how does it help us make Ethereum cheaper and more efficient to use?
Grasping the power of ZK proofs to scale the Ethereum Virtual Machine (EVM) requires us to first understand what the EVM is. In one sense, the EVM is simple: It’s the mechanism by which the Ethereum blockchain executes transactions.
Every blockchain needs a set of rules for determining which transactions are valid. In the case of Ethereum, the EVM performs this function. Think of it as the computer running the Ethereum network, tasked with ensuring the integrity of changes to the state of the blockchain.
In the words of the Ethereum Foundation:
The EVM’s physical instantiation can’t be described in the same way that one might point to a cloud or an ocean wave, but it does exist as one single entity maintained by thousands of connected computers running an Ethereum client.
The Ethereum protocol itself exists solely for the purpose of keeping the continuous, uninterrupted, and immutable operation of this special state machine. It's the environment in which all Ethereum accounts and smart contracts live. At any given block in the chain, Ethereum has one and only one 'canonical' state, and the EVM is what defines the rules for computing a new valid state from block to block.
As the above clarifies, the EVM takes the collective input of all individual computers participating in the Ethereum network and creates the conditions in which we can transact and deploy smart contracts. The EVM is thus the supra-computer that gives us the functionality we value from Ethereum.
But Ethereum, and thus the EVM, has one big problem: It needs to scale! The throughput of Ethereum is too low, and transactions cost too much. So what do we do about that?
The general approach to using ZK proofs to scale Ethereum is to build what’s known as a ZK rollup. This is a Layer 2 protocol that “rolls up” a large batch of transactions and then uses a ZK proof to verify them to Ethereum. Many transactions become one, which reduces costs and increases throughput.
The challenge, of course, is that the EVM is a specific environment in which a wide array of activities occur. If you’re a developer used to working within the EVM, any changes to that environment could not only cause you headaches–they could, in the worst case, render your app unusable. So anyone who wants to scale Ethereum while retaining all of its capabilities has to consider how the environment of the EVM might be preserved even as we seek to harness the power of ZK proofs. Such an attempt to keep the workings of the EVM recognizable within a ZK rollup is known as a “zkEVM.”
This is not an easy problem to solve. Vitalik Buterin has laid out the trade-offs involved. They can be summarized in this formulation: The closer a zkEVM is to the EVM in its every detail, the more costly it will be to generate ZK proofs. This is in part because the EVM wasn’t initially designed with ZK scaling in mind, so it’s inherently easier to generate ZK proofs in an environment optimized for doing so. Preserving the EVM must thus be balanced against optimal scaling.
The good news for everyone seeking to build and use zkEVMs is that it is in fact possible to maintain equivalence with the EVM in most senses that matter to developers while still getting the benefits of ZK scaling. The even better news is that Polygon has a balanced approach to addressing this dilemma.
One approach to scaling the EVM with ZK proofs is being developed by our own ZK teams: Polygon zkEVM. It’s our best attempt at resolving the basic zkEVM dilemma of compatibility versus performance. Within Vitalik’s framework, we are classified as a project that is building towards being what he calls a Type 2 zkEVM. (Important to note that, at the time of his original blog post, we were still a Type 3 zkEVM–that is, less compatible with the EVM than a Type 2.)
According to Vitalik, a Type 2 zkEVM is very close to the EVM itself: “Type 2 ZK-EVMs strive to be exactly EVM-equivalent, but not quite Ethereum-equivalent. That is, they look exactly like Ethereum "from within", but they have some differences on the outside, particularly in data structures like the block structure and state tree.” Polygon is building towards this level of equivalence because we believe that developers and users deserve a zkEVM that looks, feels, and acts like Ethereum, but with the scaling power of ZK proofs.
One of the key ways in which we get there is via the major technical breakthroughs made by our ZK teams. For instance Polygon zkEVM benefits from Plonky2, the fastest ZK proving system yet developed. Created by the Polygon Zero team as well as outside contributors, Plonky2 helps Polygon zkEVM resolve the performance side of the zkEVM dilemma. We can generate fast proofs even as we achieve near-complete equivalence to the EVM.
We hope you can see why Polygon believes zkEVMs are key to the future of Ethereum and why we are committed to building the best one we can.
If you’re interested in learning more about zkEVM and want to talk to our team directly about it please fill out this form. Learn more about Polygon zkEVM, check out the source code on Github and tune into our blog for the latest from the Polygon ecosystem.
Let’s bring the world to Ethereum!
Next month, Polygon zkEVM will be center stage at ETH India and Polygon Connect, our dev-driven sessions preceding the conference. Polygon co-founder David Schwartz will lead several discussions on Polygon zkEVM, including "zkEVM & Polygon ID: A Major Milestone in Ethereum," on the main stage, and “zkEVM: The New Ethereum Dev Frontier,” on the side...
There is no standardized measure of how many Zero Knowledge (ZK) rollup projects are in development. By one count, it's more than 300. By another it's closer to 20. But by either metric, the overwhelming majority of ZK rollups are still maturing. And as these rollups mature to testnet and mainnet, they will be faced...
The ZK Whiteboard Sessions recently published Module 13 of their dev-driven educational series for everything Zero Knowledge. The episode, titled “Fast Recursion with Plonky2,” features Polygon’s own Brendan Farmer and William Borgeaud, part of the team working on Plonky2. Unveiled by Polygon in January, Plonky2 represented a major step forward for ZK proving systems. That...