Topics BlockchainCurrent Page

zkEVM: The Next Evolution in Ethereum's Scalability Journey

Intermediate
Blockchain
Nov 20, 2023
9 min read

AI Summary

Show More

Detailed Summary

Ethereum's flexibility and versatility have made it one of the most popular blockchains for web3 developers. However, all of this popularity has led to some issues with network congestion and high gas fees. A new class of scaling solutions hopes to solve this problem by offering the perfect blend of convenience, security and scalability. Called zkEVMs, this new mechanism has the potential to make it much easier to handle a large volume of Ethereum transactions. To see how zkEVMs work, explore this helpful guide.

Key Takeaways:

  • zkEVM is a scaling solution that combines zero-knowledge technology with EVM compatibility.

  • It ensures that people experience all the functionality and convenience of running projects on the EVM (Ethereum virtual machine), while still getting the fast transactions and low data usage of a ZK-rollup.

  • Some of the most popular zkEVMs on the market belong to Layer 2 scaling solutions Polygon, Scroll and zkSync.

What Are ZK-Rollups?

Zero-knowledge (ZK) rollups are a type of blockchain scaling solution. They use cryptographic zero-knowledge proofs to verify data, bundle together several verifications and post them on the main chain. This makes it easy to confirm transactions without having to process a lot of extra data.

What Is EVM?

Ethereum virtual machine (EVM) is a computing environment that uses the Ethereum blockchain to process smart contracts. This software makes it possible for developers to build decentralized applications (DApps) and other projects on Ethereum.

What Is EVM Compatibility?

EVM compatibility essentially means that a system will work with all of the standard protocols on Ethereum. If a project is EVM compatible, all of the Ethereum smart contracts that it writes and deploys can run on Ethereum without any issues.

What Is EVM Equivalence?

EVM equivalence takes compatibility one step further. Instead of simply being able to work with Ethereum, EVM-equivalent systems function as if they’re part of the Ethereum ecosystem. EVM equivalence guarantees that even nonessential features, such as Layer 2 modules, tools and smart contract libraries, will run smoothly.

What Is zkEVM?

zkEVM is a scaling solution that combines zero-knowledge technology with EVM compatibility. This ensures that people experience all the functionality and convenience of running projects on the EVM while still getting the fast transactions and low data usage of a ZK-rollup.

Ethereum-approved zkEVM options have been discussed almost since ZK-rollups were first created. However, it took a while for developers to design one that could fully handle all the use cases of the Ethereum virtual machine. The very first zkEVMs to be launched on the mainnet were released to the public in March 2023, with zkSync’s Era followed by Polygon’s zkEVM.

How Does zkEVM Work?

There are several different steps involved in creating a zkEVM that’s both EVM compatible and entirely scalable. To successfully create an EVM-compatible ZK-rollup, a system must complete the following process:

  1. The full computation for a smart contract is run in an off-chain environment.

  2. A proving circuit assesses the details of the transaction data and generates a zero-knowledge proof if it can confirm that the transaction was properly verified.

  3. Multiple zero-knowledge proofs are collected and bundled into a single batch that’s submitted to the main chain all at once.

  4. An Ethereum-based verifier contract receives the zero-knowledge proofs and checks the validity of each transaction.

  5. A self-executing contract updates the Ethereum network with the knowledge that all relevant transactions are verified.

Types of zkEVM Projects

zkEVM solutions come in many shapes and sizes. Typically, a zkEVM project can be divided into one of the following four categories.

Type 1 (Ethereum Equivalent)

This sort of zkEVM is designed to be fully compatible with every aspect of Ethereum and with all Ethereum layers. Though a Type 1 zkEVM is conveniently able to function as is on existing infrastructure, it can take a little extra time to handle each zero-knowledge proof computation.

Type 2 (EVM Equivalent)

This zkEVM type tends to look like Ethereum from the outside, but inner design details (such as block structure) may differ a little. The minor modifications in a Type 2 zkEVM help to speed up proof generation, but there can be slight incompatibilities when dealing with more detailed use cases.

Type 3 (Almost EVM-Equivalent)

A Type 3 zkEVM is compatible with most applications. However, certain structures, such as pre-compiles, may not function with existing EVM infrastructure. 

Despite requiring occasional rewriting, this zkEVM has the advantages of being easy to build, and fast to generate validity proofs.

Type 4 (High-Level-Language Equivalent)

This sort of zkEVM writes smart contract code in a high-level language that can then be compiled into an EVM-compatible language. It's definitely the fastest way of verifying transaction validity, but it has higher levels of incompatibility.

Why Is zkEVM Needed?

The main reason that so many people are excited about zkEVM projects is because of their potential to solve the blockchain trilemma, the standard challenge with any blockchain that makes it nearly impossible for it to be simultaneously decentralized, scalable and secure.

The Ethereum network is naturally decentralized and secure, which is why it's so popular with web3 developers. However, it had to sacrifice a lot of inherent scalability in order to maintain its reliability. This has led to some problems such as sky-high gas fees when certain internet trends require the network to handle a lot of smart contracts at once.

This is where zero-knowledge rollups come in. These scaling solutions are an easy and fast way to handle transactions on Ethereum. Since they only require transaction verifications to be placed on the mainnet, users don't have to send all of the transaction metadata and other details. Furthermore, the rollup design lets users process all of these verifications at once, so even vast amounts of data can be handled quickly and affordably.

In addition to adding scaling, the zkEVM is also the ideal solution because it interfaces seamlessly with the Ethereum environment. Developers who use a zkEVM don't have to worry about bugs due to misunderstandings between their system and the EVM. They can use the broad suite of development tools available on Ethereum, so creating scalable DApps and other projects is straightforward.

Best zkEVM Projects

Several different groups have rolled out their own versions of a zkEVM. Following is a brief comparison of a few of the best zkEVM designs.

Polygon’s zkEVM

This open-source zkEVM system is a Type 3 network, and is one of the first zkEVMs to be launched. Additionally, it has the approval of Ethereum creator Vitalik Buterin. Since it relies on Polygon's extremely large validator set, Polygon zkEVM is very secure. Compared to other zkEVM designs, Polygon’s does an excellent job of performing at high speeds, but it's not always fully EVM compatible.

zkSync’s zkEVM

zkSync’s zkEVM, Era, uses a custom virtual machine to speed up the generation of validity proofs while still supporting many Ethereum protocols. The Era zkEVM is a Type 4 system that turns Solidity, Vyper and Yul code into EVM-compatible code. zkSync tends to have more compatibility issues than other zkEVM projects, but it beats the rest at providing fast, affordable transactions.

Scroll’s zkEVM

Scroll’s developer-focused zkEVM is currently offering an alpha testnet to the public. At this time a Type 3 zkEVM, its levels of speed and compatibility are somewhat similar to Polygon’s zkEVM. However, Scroll has short-term plans to move to a Type 2 zkEVM and long-term plans to become a Type 1 zkEVM. If it can manage these goals, it may become one of the most compatible options on the market.

Pros and Cons of zkEVMs

zkEVMs can provide users with many different benefits:

  • Developers can easily make new projects for Ethereum, so they can continue working with a familiar system.

  • ZK-rollups have proven to be one of the fastest ways of handling all of the small microtransactions commonly used for Ethereum DApps and other web3 projects.

  • Since zkEVM is interoperable, people who use it can be confident their designs will seamlessly work with both future and existing Ethereum infrastructure.

  • Compared to some other scaling solutions, zkEVMs provide extra security and privacy.

  • zkEVMs have lower gas costs than other Ethereum scaling options, such as sidechains.

However, keep in mind that a zkEVM does come with some potential downsides:

  • The design of the zkEVM doesn't always work well with the concept of a zero-knowledge proof computation, so it's not the most intuitive scaling method to use on Ethereum.

  • The closer a zkEVM gets to true Ethereum compatibility, the less efficient it is. Type 1 zkEVMs can be very expensive to operate.

  • A zkEVM is especially likely to struggle in terms of achieving compatibility with EVM special opcodes. zkEVMs often have difficulty managing things like program execution or error handling.

  • zkEVMs encourage even more reliance on the EVM system, and some web3 proponents are concerned that its ecosystem cannot be truly decentralized if most projects run on a single blockchain.

The Future of zkEVMs

Since the first few zkEVM designs were released, there’s been a lot of interest in the concept. Many people are excited because they believe zkEVMs will make it much more affordable to build Ethereum DApps. The ability to combine speed, convenience and affordability has the potential to make the Ethereum mainnet even more popular. If zkEVMs work as well as their creators claim, it could lead to an explosion of new web3 and DeFi projects built on existing Ethereum infrastructure.

However, it's worth noting that it took a long time to add ZK-rollups to the EVM precisely because the base design of Ethereum doesn't work well with the idea of a ZK-rollup. People may encounter some bugs when working with Ethereum smart contracts, which could potentially drive people away from zkEVM projects. Ultimately, whether or not this scaling solution takes off will depend upon how effective the first few systems are.

The Bottom Line

By harnessing the power of zero-knowledge technology, zkEVMs make it possible to scale Ethereum more efficiently. They cut down on the amount of transaction data stored on the Ethereum mainnet, so projects are faster and more affordable. Furthermore, their compatibility with EVM allows developers to build designs that seamlessly interact with the Ethereum environment. This combination of compatibility and scalability could potentially lead to a variety of exciting projects.

#Bybit #TheCryptoArk

Bybit App
Earn the smart way