Section 2: ZkEVM Functions

When running smart contracts at the L2 layer, in order to ensure the correctness of contract execution and the validity of state transitions, a mechanism is needed to verify these operations. zkEVM (or more precisely zkVM) provides such an environment. It simulates the execution environment of the EVM (Ethereum Virtual Machine), but adds the function of zero-knowledge proof. This means that instead of executing each transaction on the main chain, the L2 layer can execute the transaction and then use zkVM to generate a concise proof (i.e. a zero-knowledge proof) that the transaction was executed correctly. This proof can then be submitted to the L1 layer for verification.

The L1 layer only needs to verify the proof generated by zkVM without re-executing the entire contract. This greatly reduces the verification overhead, allowing the L1 layer to process more data more efficiently.

Although zkEVM emphasizes its compatibility with Ethereum, it is more accurately said that it is a zero-knowledge virtual machine (zkVM). It can simulate any type of virtual machine, not just EVM. Therefore, zkVM is a more general term, while zkEVM is its Ethereum-specific implementation.

Last updated