Categories: Uncategorized

What is zkEVM? Importance of zkEVM for Ethereum Scaling 2022

What is zkEVM? Importance of zkEVM for Ethereum Scaling

The computer of the World. The machine is unstoppable. The Heart of Ethereum. The Ethereum Virtual Machine (EVM) goes by many names that highlight its importance to the Ethereum network. It is the core feature that makes it not only a ‘distributed ledger’ like Bitcoin but also a ‘distributed state machine’. EVM allows developers to create smart contracts using a programming language called Solidity. A common application of smart contracts is to manage token generation and exchange. Many applications and protocols use tokens to reward users for actions that are important to their goal. Without EVM, this would not be possible so the EVM virtual machine, a technology that made Ethereum famous, helps to execute smart contracts on the Ethereum network. What about zkEVM? is it as important as the EVM virtual machine?

What is zkEVM?

zkEVM (zero-knowledge Ethereum Virtual Machine) is a virtual machine that supports zero-knowledge proofs or ZKP to verify the correctness of the execution of programs, including the validity of inputs and outputs in the program.

Simply put, zkEVM is designed to execute smart contracts that support zero-knowledge (zk) technology.

The importance of zkEVM

First, let’s review the importance of zk technology. ZKP (zero-knowledge proofs) is a way to prove a state is true without having to reveal any more information so that users keep privacy such as personal information, business secrets, proprietary data… Especially in the Web3 space, privacy is indispensable. For example, thanks to zk you can use the web without having your personal information stolen, or use proprietary data as input to activate smart contracts.

zkEVM leverages the resources of Ethereum, leveraging the scalability, validity, low cost, capital efficiency of zk-Rollup technology and the privacy capabilities of zk technology:

  • With Layer 2, zk-Rollup could not initially execute smart contracts, only able to execute simple swaps or payments. However, with the advent of zkEVM, zk-Rollup is supporting smart contracts and making it easy for developers to develop dApps with the familiar Solidity language.
  • With Layer 1 using zk technology like Mina, zkEVM makes proof of state directly provable on Ethereum, thereby opening a bridge between Mina and zk and Ethereum technology.

Is zkEVM a determining factor in the development of zk technology? the answer is no. For example, some non-EVM projects like StarkNet use Warp to compile Solidity language to Cairo or Polygon Miden uses the MidenVM virtual machine.

So why zkEVM and not another virtual machine? As mentioned above, it is zkEVM that helps to leverage resources from Ethereum such as:

  • Familiar tools for developers like Truffle, Hardhat, and Foundry
  • Established security best practices
  • Deploy existing modular smart contracts via OpenZeppelin
  • Many audit firms have expertise in EVM
  • The largest Web3 developer community
  • Users are familiar with EVM-based blockchain utilities such as Etherscan, metamask wallet, etc.

zkEVM powers the Ethereum scaling solution. As we know zk-Rollup is said to be Ethereum’s medium and long-term scaling solution with many advantages such as scalability up to 2000TPS (4x Optimistic-Rollup), proof-of-validation, cost low fees, efficient capital (it only takes ~10 minutes to withdraw money to L1 while Optimistic is 1 week). zkEVM elevates the zk-Rollup scaling solution through EVM compatibility, making it easy for developers to leverage resources from Ethereum.

How zkEVM works

To understand how zkEVM works, let’s first review how EVM works today.

How the EVM virtual machine works

Virtual machines work in a similar way to physical machine with storage, memory, and CPU, but they operate entirely as code.

  • The contract bytecode (compiled from the source code) is loaded from the EVM’s storage and executed by the peer nodes on the EVM. The nodes use the same inputs, which ensures that each node arrives at the same result (or else they cannot reach a consensus).
  • EVM Opcodes (included in bytecode) perform read-write operations i.e. read values ​​from state storage and write new values ​​to EVM’s memory.
  • EVM opcodes perform computations of values ​​obtained from state storage before returning new values. This update results in the EVM transitioning to the new state (transactions are called “state transitions” for this reason). This new state is copied by other nodes and maintained until another transaction is committed.

How zkEVM works

Like the EVM, zkEVM is a virtual machine that transitions between states after program execution. But zkEVM goes even further by generating zero-knowledge proofs (ZKPs) that verify the different factors in each calculation:

  1. Bytecode Access: Is the appropriate program code loaded properly, from the correct address?

2. Read and write operations:

  • Does the program fetch the matching values from the stack/memory/storage (stack/memory/storage) before calculating?
  • Does the program write the correct output values to the stack/memory/storage (stack/memory/storage) after completing the execution?

3. Calculation: Are the opcodes executed correctly?

Architecture zkEVM

ZkEVM is divided into three parts: an execution environment, a proving circuit, and a verifier contract. Each component contributes to zkEVM’s program execution, proof generation, and proof verification.

Execution environment

The execution environment is where programs (smart contracts) are run in zkEVM. zkEVM’s execution environment works like an EVM: it takes the initial state and the current transaction to create a new (aka final) state.

Circuit proof

The proof circuit generates zero-knowledge proofs (ZKPs) that verify the validity of computed transactions in the execution environment.

Proof generation is completed using input data consisting of (1) pre-state, (2) transaction input, and (3) post-state information.

The verifier then obtains a brief proof of the validity of that particular state transition.

Verifier contract

ZK-rollups submit valid proof to a smart contract deployed on the L1 (Ethereum) chain for verification.

Input (previous state and transaction information) and output (final state) are also submitted to the verifier contract.

The verifier then runs computations on the provided proof and confirms that the submitted outputs were correctly calculated from the inputs.

What are zkEVM opcodes?

zkEVM opcodes are low-level machine instructions used to execute programs in an EVM-compatible zk-Rollup.

We need zkEVM opcodes because conventional EVM opcodes are not efficient for use in zero-knowledge proof circuits. In general, there are two approaches to generating zkEVM opcodes:

Building ZK Circuits for Original EVM opcodes

This approach makes zkEVM compatible at the bytecode level equivalent to EVM. This means that developers can create smart contracts using an existing blockchain developer tool, or migrate existing Ethereum contracts to ZK-rollups without much modification. However, it is a rather complicated and time-consuming technical endeavor.

Create a new language for ZK proof computation

This approach required building a new language — designed to support validators — and developing custom opcodes. Developers will need to either write contracts directly in the new language or compile the Solidity source code into custom zkEVM opcodes.

Although this method is often simpler to implement than the first approach, it has limitations. For example, developers may not be able to access existing Ethereum infrastructure and resources.

Verdict

zkEVM is one of the most important factors that help developers build/integrate their dApps on the zk technology platform using the familiar solidity language.

Especially with zk-Rollup, zkEVM helps developers take full advantage of Ethereum’s resources, taking advantage of the scalability, validity, low cost, and capital efficiency of zk-Rollup technology and the carrying capacity Back to the privacy of zk technology. If the effort to build zkEVM is successful, the Ethereum ecosystem will certainly continue to retain a competitive edge over other alternative L1s.

The zkEVM space is likely to heat up in the coming months as zkSync makes its way to mainnet, Scroll, Polygon zkEVM runs testnet.

DISCLAIMER: The Information on this website is provided as general market commentary and does not constitute investment advice. We encourage you to do your own research before investing.

Join CoinCu Telegram to keep track of news: https://t.me/coincunews

Follow CoinCu Youtube Channel | Follow CoinCu Facebook page

Lucian

CoinCu News

Victor

Recent Posts

Why Qubetics, NEAR Protocol, and IMX Are Dominating Crypto: The Best Altcoins to Join Today for Game-Changing Returns 

Discover why Qubetics, NEAR Protocol, and Immutable X are the best altcoins to join today,…

2 hours ago

Bonk’s ICO Was Just the Start: Why BTFD Coin’s Stage 7 Price Rollback Is Your Second Shot at Crypto Glory

BTFD Coin is offering a chance to relive the glory days of meme coin investing,…

3 hours ago

Decoding BDAG’s AMA: A Blueprint for Scalable Blockchain and Enhanced Community Ties

Explore key takeaways from BlockDAG’s AMA, showcasing strides in scalability, growth of the ecosystem, and…

3 hours ago

Best Cryptos with 1000X Potential: Qubetics Revolutionises Blockchain as Polkadot and Cosmos Shape the Future

Discover why Qubetics, Polkadot, and Cosmos are the best cryptos with 1000X potential, offering innovation,…

7 hours ago

Best Coins to Buy in December 2024: Qubetics Offer 630% ROI, Polkadot Delivers on Interoperability and Near Protocol’s Scalability is Talk of the Town

Explore the best coins to buy in December 2024—Qubetics with its thrilling presale, Polkadot’s interoperability,…

12 hours ago

Crypto Market Outlook 2025 Key Factors to Watch

The Crypto Market Outlook 2025 highlights key areas: stablecoin growth, tokenization, crypto ETFs, DeFi innovation,…

15 hours ago

This website uses cookies.