The Ethereum blockchain has revolutionized decentralized applications through smart contracts, but mainnet congestion poses a challenge to wider adoption. Layer 2 scale solutions address this by moving transaction processing off-chain, but until recently they have lacked support for smart contracts.
Enter zkEVMs: Zero-Knowledge Ethereum Virtual Machines that enable layer 2 smart contracts while maintaining security. Let’s take a deeper look at zkEVMs, how they work, the challenges they face in building them, examples of currently available systems, and why they represent such an exciting breakthrough.
Essentials:
- zkEVMs are revolutionizing blockchain scaling by bringing smart contracts to the privacy-preserving world of layer 2 solutions.
- By combining the powerful Ethereum Virtual Machine with zero-knowledge proofs, zkEVMs open the door to completely private yet fully authenticated smart contract usage.
- Projects like Polygon Hermez and zkSync have already launched mainnets with zkEVM-based contracts. While costs remain high and UX can be difficult, progress is being made every day.
How does zkEVM work
To understand zkEVMs, we must first understand how they fit into Ethereum’s layer 2 scaling ecosystem. Ethereum’s layer 1 blockchain is inefficient for high transaction throughput due to limitations such as block space and transaction processing speed. Layer 2 solutions address this by batching transactions and processing them off-chain through techniques such as optimistic and zero-knowledge rollups.
In particular, zkRollups use zero-knowledge proofs to cryptographically verify transactions without publicly disclosing their details. This preserves user privacy and enables reliable validation. However, early zkRollups required more support for smart contracts, as the design of the Ethereum Virtual Machine did not take proofs into account. zkEVMs change this by combining the EVM and zero-knowledge proofs.
At a high level, zkEVMs work as follows:
- A zkEVM runs smart contract code off-chain and switches between states, just like the mainnet EVM.
- A test circuit generates zero-knowledge proofs of the validity of these state transitions based on the code, input, and new output.
- The proofs are submitted to Ethereum, where anyone can validate them without seeing the raw data.
- Once verified, the new application state becomes part of the zkEVM’s EVM-compatible data availability layer.
zkEVMs combine the versatile computation of Ethereum’s EVM with the reliable execution environment and privacy benefits of zkRollups, unlocking smart contracts for scale. Users enjoy near-instantaneous transactions, while dApps have access to the entire Ethereum toolset and ecosystem.
zkEVMs can validate and perform blockchain operations without having to make all the details public. It’s like saying, “I can prove that this transaction or contract is valid and compliant, but I won’t show you the full mechanics of it.” Image source: Chainlink
Challenges in building zkEVMs
While zkEVMs opened promising doors, they realized that their potential posed significant technical challenges. The EVM was never designed with evidence in mind, so several aspects conflict with this new paradigm.
First, the EVM’s stack-based architecture proved difficult to convert to a format compatible with proofing. The special error-handling opcodes also confounded efforts to build verifiable circuits.
Storage was another hurdle, as the EVM’s Merkle Patricia tree clashed with proven needs. Replacing the KECCAK256 hashing function helped, but risked breaking infrastructure compatibility.
Most importantly, zero-knowledge proofs require compute-intensive operations that drive up costs, especially on-chain. Generating and verifying evidence for each smart contract execution transaction took prohibitive resources.
Addressing these issues required rethinking key EVM components and fueling innovations in proofs such as optimized circuits and hybrid STARK-SNARK schemes. Much progress has been made, although optimizations continue as the field matures. Perfecting zkEVMs made it necessary to reconcile two dissimilar but essential technologies.
Types of zkEVMs
While research continues, several zkEVM systems have already been launched, each approaching the technical challenges slightly differently:
- Polygon Hermez: Uses a combination of SNARKs and STARKs along with an EVM bytecode interpreter on a zkEVM. Powered by the MATIC token.
- zkSync: Their zkEVM relies on custom zk opcodes and register-based virtual machine design. There is no native token yet, although there is speculation about an upcoming airdrop launch.
- AppliedZKP: An implementation focused on ergonomics for developers via Solidity integration.
- Matter Labs ZKSync: Matter Labs uses intermediate representations and an optimizing compiler.
In addition to technical differences, these zkEVMs also vary in features, user experience optimizations, and partnership ecosystems. They all represent important milestones in proving EVM compatibility while maintaining practicality and performance.
Popular zkEVM projects and areas of interest
Benefits of zkEVMs
By marrying Ethereum’s versatile smart contracts with privacy-preserving scaling, zkEVMs promise a wealth of benefits for users and developers alike:
- Faster and cheaper transactions: With transactions executed in batches off-chain, zkEVMs can process thousands of transactions per second compared to Ethereum’s 15 TPS. Gas costs are also much lower.
- Enhanced privacy: Users benefit from robust privacy without trusting centralized services, as only cryptographic proofs are revealed on the public blockchain.
- Smart contract scaling: dApps gain the ability to scale through layer 2 while retaining key Ethereum benefits such as decentralized security.
- Continuity of development: Developers use the same Solidity/Vyper languages, tooling, testing frameworks, and Ethereum’s vibrant ecosystem.
- Interoperability between the chains: As EVM compatibility improves, bridges could one day enable assets and computation to seamlessly cross disparate chains.
Widespread adoption of zkEVMs could realize the vision of Ethereum serving as a universal decentralized backplane, allowing layer 2 networks to reach their full potential through scalability and privacy. However, challenges remain in spreading these benefits.
Current status and prospects
Although zkEVMs have advanced by leaps and bounds conceptually, major hurdles still remain between research and widespread usability at scale. Chief among these is the high implementation cost that currently limits the use of zkEVM to niche scenarios and limits overall throughput.
Furthermore, fully integrating complex zkEVM proofs into applications introduces UI/UX challenges and risks that reduce developer productivity compared to simpler solutions. However, projects like Manta work intensively on abstracting this complexity.
Looking ahead, continued optimizations of the zkSNARKS/STARKS construction, circuit design, and refinement of the EVM abstraction layer provide hope that cost and usability gaps will steadily decrease. Promising developments such as zkPorter rollup aggregators can further increase throughput.
As zkEVM adoption grows, other research avenues such as reducing evidence size, offering advanced cryptography as a cloud service, and using specialized hardware are also worth exploring. Interoperability between networks is also still in its infancy.
it comes down to
While challenges remain, advances in zkEVMs reveal a future where even massively scaled decentralized applications remain private, cheap, and fully trusted through smart contracts – goals that seemed unthinkable just a few years ago. For now, early examples prove the concept works; tomorrow awaits their widespread, user-friendly reality.
If you’d like to learn more about unique computational use cases enabled by blockchain technology, check out our article on Decentralized Physical Infrastructure Networks (DePINs).