What Is a zkEVM?

Table of Contents
What Is a zkEVM
Zero-knowledge technology is one of the most popular and promising ways to scale Ethereum. What is referred to as a zkEVM is one common application of ZK proofs to scale Ethereum (zero-knowledge Ethereum Virtual Machine). In essence, a zero-knowledge Ethereum Virtual Machine is a virtual machine that provides zero-knowledge proofs to confirm the accuracy of programs. ZkEVMs are intended to execute smart contracts in a way that supports zero-knowledge technology. ZkEVMs are a component of zero-knowledge (ZK) rollups, which is an Ethereum layer 2 scaling technique that increases throughput by moving computation and state storage off-chain. A ZK-rollup transmits transaction data to Ethereum combined with zero-knowledge proofs to confirm the legitimacy of off-chain transactions. With the emergence of EVM-compatible zero-knowledge virtual machines, it compensates for ZK-rollups' lack ability to execute smart contracts and is limited to simple token exchanges and payments. In this article, we are going to explore what is a zkEVM, how it works, why is it important and the types of zkEVM.

What is a zkEVM?

zkEVM is a virtual machine that allows zero-knowledge proof computing. In contrast to normal virtual machines, a zkEVM guarantees the accuracy of program execution, including the legality of the inputs and outputs employed in the operation.
Let’s divide it in parts to better understand the zkEVM.

EVM compatibility

The EVM (Ethereum Virtual Machine) is the runtime environment used to execute smart contracts installed on the Ethereum network. Decentralized applications (dApps) running on the Ethereum blockchain are powered by the EVM, which operates as a “world computer”.
A virtual machine is considered to be EVM-compatible if its programs can work in the EVM environment. These virtual machines (VMs) may carry out Solidity- or other high-level language-written smart contracts utilized in Ethereum development. ZkEVMs can execute Ethereum smart contracts without requiring significant changes to the underlying logic, making them EVM-compatible.

Wrapping EVM computation in zero-knowledge proofs

The process of building EVM-compatible, zero-knowledge-friendly virtual machines is challenging since the EVM was never intended to employ zero-knowledge proofs. Fortunately, recent research developments have made it somewhat viable to encapsulate EVM computation in zero-knowledge proofs.
Various zkEVM projects use various strategies to combine EVM execution with computation of zero-knowledge proofs and each strategy has its own tradeoffs.

How does a zkEVM work?

A zkEVM is a virtual machine that, like the EVM, changes states as a result of program activities. The zkEVM, however, takes a step further and provides a proof to support the accuracy of each calculation component. A zkEVM essentially employs a mechanism to demonstrate that the above specified execution steps were carried out in accordance with the rules.
To understand how a zkEVM works, we must first take a look at how the EVM works.

How the EVM works

The Ethereum Virtual Machine is a state machine that responds to inputs by switching from one state to another. Every smart contract execution results in a "state transition," which is a change in the EVM's state. An overview of what takes place during a smart contract transaction is provided below:
  1. Peer-to-peer nodes on the EVM load and execute contract bytecode, which was generated from the source code. Nodes employ the identical transaction inputs, ensuring that each node produces the same outcome (or else the consensus cannot be reached).
  2. EVM Opcodes, which are included in the bytecode, interact with various state components of the EVM (memory, storage, and stack). Opcodes carry out read-write operations—reading (getting values from state storage) and writing (sending) new values to the EVM's storage—by performing read-write operating processes.
  3. Before returning the new values, EVM opcodes compute the values taken from state storage. The EVM enters a new state as a result of this update (this is why transactions are referred to as "state transitions"). This new state is copied by other nodes and remains until another transaction is carried out.
The program execution in the Ethereum Virtual Machine (EVM)
The program execution in the Ethereum Virtual Machine (EVM) [Source]

How the zkEVM works

The zkEVM provides zero-knowledge proofs to confirm different components in each computing process.
  1. Bytecode access: Was the right program code loaded properly and from the correct address?
  2. Read-write operations: 
    1. Before the computation, did the program retrieve the correct values from the stack, memory, or storage?
    2. After execution was complete, did the program write the right output values to the stack, memory, or storage?
  3. Computation: Did the opcodes run properly—that is, sequentially, without skipping any steps?

Leaders in the battle for zkEVM

Polygon zkEVM (Polygon Hermez)

Polygon finished paying $250 million for the Hermez Network in 2021. In the middle of 2022, the business released Polygon Hermez, its Ethereum Layer-2 ZK-rollup solution. The Polygon Hermez project was renamed Polygon zkEVM in July 2022 after Polygon revealed they were constructing a zkEVM.
The Type-2 zkEVM technique was used by the open-source Polygon zkEVM, which aims to be EVM-equivalent but falls short of Ethereum-equivalence. Developers will need to modify code and EVM tools to the ZK-rollup due to Polygon zkEVM's structure. With up to 90% lower transaction costs than the Ethereum Mainnet, Polygon anticipates its zkEVM to reach 2000 transactions per second. Polygon introduced their zkEVM Public Testnet on October 10.

zkSync

Developed by Matter Labs, zkSync follows the Type-4 methodology and supports compatibility with the Ethereum programming languages Solidity and Vyper. Since going live, zkSync 1.0 has handled around four million transactions. The latest offering from zkSync, zkSync 2.0, is a zkEVM-powered EVM-compatible ZK rollup that comes under EVM compatibility rather than EVM equivalence.
Developers will be able to create Solidity smart contracts within zkSync, and the protocol will transpile such contracts into Yul, another language it supports. Compared to its rivals, Type-4 zkEVM zkSync 2.0 had speedier proving times but less application compatibility. Right now, zkSync 2.0 is accessible on the Ethereum Testnet.

Scroll

In partnership with the Ethereum Foundation's Privacy and Scaling Explorations group, Scroll is developing a zkEVM solution that is geared for the Type-2 zkEVM class, such as Polygon zkEVM. The project is now in the pre-alpha phase, and developers and testers are invited to test the network in action.
Although Scroll has a similar design to Polygon zkEVM, it performs less well than zkSync 2.0, and Polygon zkEVM in terms of performance due to its high composability capability. With security and transparency as its top priorities, Scroll aspires to create the first zkEVM that is truly similar to an EVM.
The zero-knowledge EVM concept is also being developed and extensively researched by the Privacy and Scaling Explorations group. Although there haven't been any official announcements yet, their approach tends to favor that Type-1 zkEVM class.

Final Words

ZK-rollup-like zkEVMs are a welcome innovation in the cryptocurrency world since they facilitate the implementation of smart contracts and application compatibility while addressing the Ethereum scaling issue.
We anticipate widespread adoption and greater significance as zkEVM solutions from initiatives like Scroll, Polygon, and zkSync rush to market, relieving a major pain point in the blockchain community. It's also important to keep in mind that zkEVMs are still a work in progress and that it's virtually difficult to anticipate the future given the speed of innovation in Web3.
In the upcoming years, we may discover use-cases for zkEVMs and zk proofs that go beyond scalability and privacy, but we shouldn't discount the possibility that a totally unexpected source may hold the key to solving the scaling problem for blockchains.

About Orochi Network

Orochi Network is a cutting-edge zkOS (An operating system based on zero-knowledge proof) designed to tackle the challenges of computation limitation, data correctness, and data availability in the Web3 industry. With the well-rounded solutions for Web3 Applications, Orochi Network omits the current performance-related barriers and makes ways for more comprehensive dApps hence, becoming the backbone of Web3's infrastructure landscape.
Categories
Event Recap
3
Misc
56
Monthly Report
1
Oracles
4
Orand
3
Orosign
19
Partnership
20
Verifiable Random Function
9
Web3
85
Zero-Knowledge Proofs
31
Top Posts
Tag
Orand
NFT
Misc
Web3
Partnership Announcement
Layer 2
Event Recap
Immutable Ledger
Oracles
Verifiable Random Function
Zero-Knowledge Proofs
Multisignature Wallet

Orosign Wallet

Manage all digital assets safely and securely from your mobile devices

zkDatabaseDownload Orosign Wallet
Coming soon
Orochi

zkOS for Web3

© 2021 Orochi