What is zkEVM — EVM, types of zkEVMs, Polygon zkEVM, zkSync and Scroll
Our exploration of possible scalability solutions through layer-2 technologies on Ethereum continues. With the introduction of technologies such as StarkWare or zkSync, there is one major component of this sub sector that has not been properly explored.
That is zkEVM, which stands for zero-knowledge Ethereum Virtual Machine. While we have already explored what zero-knowledge and zk-rollups are, we have not looked at the examples of these technologies that are EVM-compatible or EVM-equivalent. And that is the main topic of today’s article.
What is EVM?
As always, before we dive deep into more difficult and complicated topics, we will be starting with simple concepts, upon which we will be then building. That is one of the reasons why we need to introduce EVM, before we look at zk-EVM.
EVM (Ethereum Virtual Machine) is a mechanism which allows the Ethereum blockchain to execute the transactions on its network. It consists of predetermined rules and sets of rules which state which transactions are valid. In theory, EVM is the computer that runs the Ethereum network with one main goal — to ensure the integrity of changes to the state of the blockchain.
This super computer then gives the functionality to the whole Ethereum by creating conditions that are taken from the collective input of all individual computers of the Ethereum network. Thanks to them, the users of the network can do operations such as transactions or deployment of smart contracts and take advantage of the world of decentralized finance (DeFi), for example.
While all of this sounds good in theory, in practice it needs one more thing to perform rather satisfactorily. And that is scalability, since the transaction costs are too high, while the overall throughput is too low. And that is where different solutions based on rollups and zero knowledge proofs come into play.
What is zkEVM?
A zkEVM (zero-knowledge Ethereum Virtual Machine) is a virtual machine that is a layer-2 scaling solution on Ethereum, which improves the throughput of transactions. It generates zero-knowledge proofs to verify the correctness of programs, while executing smart contracts that support zero-knowledge technology.
Thanks to this process, in which the transactions are batched together on layer-2 to form a single transaction that is then broadcasted to the layer-1, many transactions become one, inherently reducing the costs and increasing the throughput of the overall network.
zkEVMs are thus very similar to zk-rollups. In fact, they can be considered the same, but upgraded, technology that is used in the zk-rollups. zkEVM tries to replicate the environment of Ethereum as a “rollup,” which means that it wants to allow the developers to build on these services and through these technologies similarly to the native Ethereum network. Thus, all the zkEVM applied projects are trying to reach the same goal which is to create a zk-rollup experience that feels like the layer-1 network of Ethereum.
This is something that was lacking before, as the smart contracts as well as simple token swaps and payments lacked the ability to execute. However, through zkEVM, this should be possible due to its characteristics.
Simple graphic image of what zkEVM represents, alchemy.com
Types of zkEVMs
What is interesting about zkEVMs is that it appears that they are understood differently. The difference for instance seems to be between EVM-compatible and EVM-equivalent solutions. In this case, the difference between compatibility and equivalence is as follows.
EVM-equivalent solution is such that it 100% reminds the experience of developing on Ethereum. In this case, the developers have all the tools and frameworks that are completely the same as the ones used on Ethereum mainnet. In general, equivalence is very important for developers as it ensures that less overhead is needed when migrating between layers. Arbitrum and Optimism are examples of such projects.
On the other hand, compatibility means that not all frameworks or tools are plugged into the given solution. For instance, some of the smart contracts would need to be rewritten, sometimes in a completely different programming language. Moreover, some operations might not be fully supported by the rollup. Overall, this can cause problems and leads to bugs. For instance, Polygon zkEVM, while expected to be EVM-equivalent, is better described as EVM-compatible, but so is zkSync.
In general, the lines between EVM-compatible and EVM-equivalent are so blurred and imprecise that some might consider one project to be EVM-compatible, while others will define it as EVM-equivalent. Vitalik Buterin himself wanted to clear the fog around the different types of EVM projects in this graphic.
Classification of zkEVMs by Vitalik Buterin, blog.pantherprotocol.io
Top zkEVM projects
With that being said, some of the different projects connected to zkEVM have already been mentioned. What are they and what is it that they are trying to do?
1.Polygon Hermez — Polygon zkEVM
Polygon zkEVM is the first type of zkEVM which supports EVM compatibility. It uses STARK and SNARK proofs to verify the correctness of the program execution. While STARK (Scalable Transparent Argument of Knowledge) is used to generate proofs of validity for the state of the transactions, SNARK (Succinct Non-Interactive Argument of Knowledge) is used to assess the correctness of STARK proofs.
This combination of solutions allows for security as well as speed and low transaction fees. Polygon has been developing this solution since 2021, when it purchased Hermez Network for $250 million. Then, in July 2022, it announced the rebranding of Polygon Hermez to Polygon zkEVM, which is currently being developed.
2.zkSync — Matter Labs
zkSync is another solution that belongs to the category of EVM-compatible zk-rollup. We have introduced this topic cohesively in this article. However, to point out the difference between Polygon zkEVMs, Scroll and zkSync, here are the key takeaways.
zkSync is compatible with Ethereum since it compiles contract code written in Solidity to Yul and re-compiles the Yul bytecode to a custom, circuit-compatible bytecode set, which is specially designed for zkSync’s EVM. zkSync is currently being developed by Matter Labs and has support of some important backers such as Ethereum Foundation, BitDAO or Curve.
3.Scroll
Scroll is another solution that tries to implement zkEVM to Ethereum. Currently it looks like this solution will belong to the Type 2 class of EVMs, just like Polygon, which it resembles in many ways, such as its architecture.
The aim of this project, which is supported by Privacy and Scaling Explorations group, is to build and implement the first EVM-equivalent zkEVM. Moreover, Scroll highly values the importance of security and transparency.
Comparison of zkEVM projects in development, Source: alchemy.com
Overall, there are other solutions that could belong to this category as well such as StarkWare or AppliedZKP zkEVM. While all of these projects will try to outcompete the other in some way or another, as of now, it is impossible to judge which one is superior. All of them are working on their development, but mostly the implementation stage or the usecases in the future will bring resolution to this race.
It is expected that the end of the year 2022 and the whole 2023 can bring a lot of interesting news in this sphere, with all of these projects working as hard and fast as possible to become the one leading scalability solution that will become the norm.
Conclusion
zkEVMs have a potential to significantly improve the overall experience of any Ethereum user. Due to several projects already working on this solution and trying to implement it, there is an ongoing competition between them, which can only benefit the whole network. While most of them are still in development phase, several are expected to release their alpha and beta version soon, with the year 2023 being a crucial stepping stone for zkEVMs implementation and use.