Key Takeaways
A zkEVM is a zero-knowledge Ethereum Virtual Machine that can execute smart contracts in a way that is compatible with zero-knowledge proof (ZKP) technology.
zkEVMs extend zk-rollups on Ethereum to support decentralized applications (DApps), not just simple token transfers.
Developers can port existing Ethereum DApps and smart contracts to a zkEVM without needing to learn zero-knowledge cryptography.
zkEVMs are categorized into four main types based on the tradeoff between EVM compatibility and ZK proof efficiency.
Introduction
Ethereum developers did not design the network with zero-knowledge proofs (ZKPs) in mind when they first proposed the network in 2014. In the years since, ZKP technology has gained significant momentum in the blockchain space, and teams have worked hard to bring ZKP capabilities to Ethereum.
The result is the zkEVM, a type of virtual machine that can run Ethereum smart contracts while generating cryptographic proofs of their correctness. This article explains what a zkEVM is, how it works, and which networks have put the technology into practice.
What Are ZK-Rollups?
A rollup is a Layer 2 scaling solution that processes many transactions off the Ethereum mainnet, then submits a compressed summary to Ethereum as a single transaction. This approach increases throughput and reduces costs compared to executing every transaction on Layer 1.
A zk-rollup is a rollup that uses ZKP technology to prove that all off-chain transactions were processed correctly. Instead of publishing all transaction data, it submits a validity proof alongside a state update. Optimistic rollups take a different approach, relying on fraud proofs and economic incentives rather than cryptographic guarantees.
Early zk-rollups were limited to simple operations such as token transfers. A zkEVM extends this to cover the full range of smart contract execution, making zk-rollups suitable for general-purpose DApps.
What Is the EVM?
The Ethereum Virtual Machine (EVM) is the runtime environment inside Ethereum where smart contracts are executed. Every time a smart contract runs, the EVM transitions from one state to another. All nodes on the network must agree on this state to maintain consensus.
The EVM is defined by a set of opcodes, which are low-level instructions. When developers write contracts in Solidity or Vyper, those contracts are compiled down to EVM bytecode that the EVM can interpret. This shared standard is what makes Ethereum smart contracts portable across compatible chains.
How Does a zkEVM Work?
A zkEVM replicates the Ethereum environment inside a zk-rollup. It takes an initial state, processes a batch of transactions according to EVM rules, and outputs a new state together with a validity proof. A verifier contract on the Ethereum mainnet checks this proof without re-executing every transaction.
This approach means the correctness of every state transition is cryptographically guaranteed, not just assumed. Developers can deploy existing Ethereum smart contracts on a zkEVM with little or no modification, because the execution environment follows the same rules as mainnet.
Generating ZK proofs for EVM execution is computationally intensive. Hardware acceleration and algorithmic improvements in recent years have reduced proof generation times considerably for many implementations, from what was once potentially several hours to minutes or seconds in some configurations, though this varies by network and batch size.
EVM Compatibility vs. EVM Equivalence
EVM compatibility means a blockchain can deploy and run Solidity-based contracts with minimal changes. Many chains (including BNB Smart Chain) are EVM-compatible. Developers can generally copy Ethereum contracts and deploy them with only small adjustments.
EVM equivalence goes further. It means a zkEVM behaves identically to Ethereum at a deep technical level, so existing tooling, debugging environments, and developer infrastructure work without modification. The closer a zkEVM is to full equivalence, the easier migration becomes, but the harder it is to generate efficient ZK proofs.
Different Types of zkEVMs
In a blog post, Ethereum co-founder Vitalik Buterin categorized zkEVMs into four types based on the tradeoff between ZK efficiency and EVM compatibility.
Type 1: consensus-level equivalence
A Type 1 zkEVM is fully equivalent to Ethereum at the consensus level. It can verify Ethereum blocks directly. This makes it the most compatible type, but ZK proof generation is the most computationally demanding. One example of this is Taiko’s Type 1 zkEVM mainnet, launched in mid-2024.
Type 2: bytecode-level equivalence
A Type 2 zkEVM is fully compatible with the EVM but differs from Ethereum in some internal data structures, such as the state tree. It supports all existing Ethereum DApps and tooling. Proof times are improved compared to Type 1, but remain significant. Scroll and Polygon zkEVM are examples of Type 2 networks.
Type 2.5: Type 2, with modified gas costs
Type 2.5 is similar to Type 2 but adjusts gas costs for operations that are expensive to prove. This improves prover efficiency with a small impact on full compatibility.
Type 3: near-EVM equivalent
Type 3 zkEVMs sacrifice some compatibility for better ZK performance. They may remove certain precompiles or other EVM features that are difficult to prove efficiently. Some DApps may need minor modifications to deploy.
Type 4: high-level language equivalence
Type 4 zkEVMs compile high-level languages like Solidity directly to ZK-friendly bytecode, bypassing EVM bytecode entirely. This offers the best proof performance but the lowest compatibility. zkSync Era uses a Type 4 approach.
FAQ
What is a zkEVM?
A zkEVM is a zero-knowledge Ethereum Virtual Machine that processes smart contracts inside a zk-rollup, then generates a cryptographic proof that shows all transactions were executed correctly. It allows developers to use existing Ethereum code with the added security and scalability benefits of ZKP technology.
How is a zkEVM different from a regular zk-rollup?
Early zk-rollups supported only simple operations like token transfers. A zkEVM extends this to the full EVM instruction set, which means any Ethereum smart contract, including complex DeFi protocols and NFT platforms, can run on a zkEVM with minimal modifications.
What are the four types of zkEVMs?
Vitalik Buterin defined four types. Type 1 is fully equivalent to Ethereum at the consensus level. Type 2 is fully EVM-compatible but differs in some internal data structures. Type 3 sacrifices some compatibility for better ZK performance. Type 4 compiles high-level languages directly to ZK-friendly bytecode, offering the highest proof efficiency.
Do zkEVMs make Ethereum safer?
zkEVMs use cryptographic validity proofs rather than relying on economic game theory to ensure correct execution. This means the correctness of each batch is mathematically verifiable, which can strengthen security guarantees compared to systems that depend on challengers to catch fraud. However, like all blockchain systems, zkEVMs carry smart contract risk and other technical risks that users should research independently.
Closing Thoughts
zkEVMs combine the security of ZKP cryptography with full smart contract compatibility, making it possible to run DApps at higher throughput and lower cost without sacrificing Ethereum-grade security guarantees. It’s worth understanding the different types and how the technology may be compatible with Web2 use cases.
Further Reading
What Is Zero-Knowledge Proof and How Does It Impact Blockchain?
Optimistic vs. Zero-Knowledge Rollups: What's the Difference?
Disclaimer: This content is presented to you on an "as is" basis for general information and or educational purposes only, without representation or warranty of any kind. It should not be construed as financial, legal or other professional advice, nor is it intended to recommend the purchase of any specific product or service. You should seek your own advice from appropriate professional advisors. Where the content is contributed by a third party contributor, please note that those views expressed belong to the third party contributor, and do not necessarily reflect those of Binance Academy. Digital asset prices can be volatile. The value of your investment may go down or up and you may not get back the amount invested. You are solely responsible for your investment decisions and Binance Academy is not liable for any losses you may incur. For more information, see our Terms of Use, Risk Warning and Binance Academy Terms.
