For years, critics of Ethereum have lamented how slow it is. The core protocol can handle only 10-15 transactions per second, and fees frequently become unsustainable during times of high user activity. Developers have tried a number of solutions, among them sidechains, which shift transactions to a second layer where they are processed at speed and then referred back to the main chain.
Often these sidechains batch transactions together and beam all them back to the core protocol at once, “rolling them up” and presenting them for validation. Historically this has worked on individual applications—but there is a problem: many of these sidechains make use of so-called “optimistic” rollups.
These batch together transactions and present them to the core protocol without any proof that the transactions were executed correctly and fairly; at the protocol layer it can take up to two weeks to sift through the transactions and verify them conclusively (That’s why they are “optimistic”—they’re optimistic users aren’t lying).
Enter the latest innovation: The zkEVM!
What are zkEVMs?
zkEVMs (and an accompanying innovation known as zkSync—we’ll get to this) were first being excitedly discussed at least in 2014, and the technology is finally approaching usability. Major players in the world of Ethereum development, such as Polygon and Scroll, are building them, and others are scrambling to follow suit.
In practice, a zkEVM is an overhaul of the foundational Ethereum computing infrastructure (this is the Ethereum Virtual Machine, or EVM) that makes the network compatible with a far more efficient kind of rollup using zero-knowledge proofs, an elaborate cryptographic mechanism that is critical to solving the problems outlined above. Let’s dig a little deeper.
How do zkEVMs work?
First, the zero-knowledge proof. This is a standard cryptographic innovation that has existed since the 1980s; it’s not unique to blockchain. The point of a zero-knowledge proof is to convey knowledge without revealing the specifics or content of that knowledge—a zk-proof reveals that one knows, not what one knows; that a statement is true, not why it is true.
In the context of cryptocurrency transactions, zero-knowledge proofs allow counterparties to signal to one another that their transactions are not fraudulent without revealing any additional, identifying details. Specific parameters known to both sender and receiver are required—both parties must be able to understand signals communicating that a given transaction has gone through, without knowing anything about the transaction itself.
Zero-knowledge proofs are a key component in efforts to make rollups more efficient: Unlike “optimistic” rollups, zk rollups are able to present a proof of the validity of every transaction in a batch; the “core” protocol has to do nothing. They also take up less data, meaning a batch of these proofs can be processed very quickly.
Did you know?
For years many non-Ethereum projects have been trying to bake in zk-rollup compatibility at the protocol layer. Zcash, the privacy-focused cryptocurrency, has been striving for this goal for years, and other attempts include Aleo, built by Howard Wu, and Penumbra, a layer-one zero-knowledge network for tokens and decentralized exchanges.
Zero-knowledge rollups, however, are highly specific and difficult to program; they tend to be used sparingly and on specialized applications. This is where the zkEVM comes in: It embeds zk rollup functionality into Ethereum’s main programming environment: the Ethereum Virtual Machine.
The ghost in the virtual machine
The EVM, to put it simply, translates human input at the user-level to action at the protocol level. It makes trades go smoothly; it makes smart contracts work. This work—translating coding language to computer-legible “bytecode”—is normally undertaken by a compiler, a component within a CPU. Ethereum, however, is distributed across millions of computers, so this process takes place within software shared across the network—within the cloud. This is why it’s a “virtual” machine.
The problem: Standard EVMs can only interpret rollups on a case-by-case basis, meaning there is no unified programming language and ZK rollups must be designed individually.
So, the zkEVM? It’s a new kind of Ethereum Virtual Machine that is able to interpret a standardized form of zero-knowledge rollup (the most prominent being the zkSync from Matter Labs). A group of users transact; the rollup bundles them together and generates the proof via the upgraded Virtual Machine infrastructure, presenting it to the core protocol; finally, the core protocol—and this is the clever part—is able to judge the proofs as correct without wasting time, and money, sifting through endless data.
Unlike with Optimism, invalid transactions simply cannot be submitted. This allows, supposedly, for an exponential increase in speed: ZK rollups can offer up to 2,000 transactions a second; when enhanced with other technologies like ZK Porter they can get up to 20,000.
Importantly, zkEVM uses the same coding language, Solidity, that Ethereum developers are already familiar with. That makes it to a certain extent compatible with existing Ethereum infrastructure: NFTs, smart contracts, dapps, DEXs, etc. In theory, stakeholders will only have to download the software onto their nodes, and the result will be the same Ethereum, but with a juiced up feature allowing bundles of cheap, easily verifiable transactions.
zkEVM technology is far from perfect. Howard Wu, a former zCash researcher and the developer behind Aleo, an original blockchain protocol that bakes zk-compatibility into the protocol layer, said that zkEVMs can often take 12-24 hours to produce the proof that is subsequently transmitted to the core protocol (versus Ethereum’s 10-15 seconds).
Another problem, he said, is that zkEVMs are computationally intensive, and usually place the burden of generating the zero-knowledge proof for a batch of transactions on a single computer—which becomes a single point of failure prone to censorship. And as seen with privacy project Tornado Cash, the US government is more than willing to take down centralized crypto projects.
Further, despite the boon zkEVMs bring to compatibility, even that is far from perfect: Many decentralized finance (DeFi) applications, such as Curve, employ in their codebase features designed for efficiency that are not supported by any zkEVM projects. The use of a multitude of rollups operating at different speeds will also “fragment liquidity,” Wu said. “This will break flash loans, and increase price spreads, leading to increased price stability risks for many DeFi protocols.” There is, evidently, still some work to be done!
Who’s building zkEVM rollups?
- 💱 Polygon - a project dedicated to financing and building Ethereum infrastructure.
- 📜 Scroll - a project devoted entirely to researching zero-knowledge proofs.
- 🥼 Matter Labs - developers behind the zkSync rollup technology.
The future of zkEVM
zkEVMs are still very experimental technology. Polygon’s testnet will only be available in Q3 2022; its mainnet is expected in 2023. But given they were previously thought to be years away, that’s not quite so long at all.