The Ethereum ecosystem is set to witness one of the hottest blockchain trends this year, with many companies eager to tap Polygon’s upcoming zkEVM deployment.
What are zero-knowledge proofs?
Zero-knowledge (ZK) technology is a cryptographic solution that is reshaping the blockchain industry. They run low-level languages and bytecode at a programmable level, backed by the same rules as the Ethereum mainnet.
It is a virtual machine that uses zero-knowledge proofs to verify data without revealing any information about the content or properties of the data. It is a censorship-resistant protocol replicating the transaction execution environment of the Ethereum mainnet.
Vitalik Buterin, the founder of Ethereum, categorized zkEVM into four main types.
- ZkEVM type 1: fully equivalent to Ethereum
- ZkEVM type 2: EVM equivalence (not Ethereum)
- ZkEVM type 3: from the EVM
- ZkEVM type 4: close cousins of EVM
“The project is a complete engineering project,” said Jordi Baylina, who leads the engineering team building the Polygon zkEVM. “The idea is that with these electronic components, we have sort of built a processor. On top of that, a program can be written to process transactions. It’s a complete stack of components with different teams working in each of these layers in these stacks.”
In a YouTube video published on March 2, Baylina explained the technical components behind the deployment, “the system we are building is censorship-resistant. It’s not a perfect solution, but up to a point because the system is not universal.
“We created the assembly itself. It’s a new processor, a new assembly, a new way of writing hardware.
Technical details
With zkEVM rollup, an ERC-20 transfer will define unique data frameworks such as ProgramCounter, GlobalCounter, EVMWord, GasInfo, and GasCost, which include and contain things like stack, memory, and opcodes. The pc and gc are encapsulated at usize, whereas EVMWord encapsulates a u8 array of length 32.
To simplify memory-related operations, developers cleverly use Rust macros to extract critical memory information such as index and range traits and implement them in a standardized way. On the other hand, Storage is represented by a HashMap, and its key values are all EVMWord
StackAddress is represented as a usize with Stack a dynamic array consisting of EVMWord.
MemoryAddress is also a usize, with values ranging from 0 to 1023, while Memory is an array of u8.
The complete zkEVM deployment technical stack is available on github.
The race for zkEVM supremacy
The race is on to hit the market with a functional product.
Several projects are in the race to release the first fully functional, EVM-equivalent zkEVM, with some of the major competitors being Polygon zkEVM, zkSync, StarkNET, and Scroll.
Polygon zkEVM is open-source and aims to reduce transaction costs by up to 90%, while zkSync 2.0 is live on Ethereum Testnet, allowing developers to write Solidity smart contracts. StarkNET uses ZK-STARKs, which are more secure but have limitations, and Scroll builds a high composability solution that prioritizes security and transparency.
Polygon’s $250 million bet on zkEVM
Polygon bought the Hermez network for $250 million in 2021 and then launched its Ethereum Layer-2 ZK-rollup solution, Polygon Hermez, in mid-2022. In July 2022, Polygon announced the renaming of Polygon Hermez to Polygon zkEVM, which adopted the Type-2 zkEVM approach to be equivalent to EVM but not Ethereum.
Developers will need to adapt EVM code and tools for ZK deployment. Polygon aims to reach 2000 transactions per second and reduce transaction costs by up to 90%, making it cheaper than Mainnet Ethereum. Polygon launched its zkEVM Public Testnet on October 10.