zkEVM: A Layer 2 Solution to Ethereum Scaling Problem

The concept of Virtual Machines (VMs) can now be called “age-old”; the first time it came into existence was when IBM, in 1972, introduced hardware-assisted virtualization. Now is the era of blockchain or distributed ledger technology, and the VM concept has emulated into what we hear now and then: Ethereum Virtual Machine (better known as EVM).

For context, an EVM is a virtual CPU that runs the smart contracts written in Solidity. When a smart contract is executed, the code gets compiled into bytecodes, and every node on the Ethereum network runs a copy of these bytecodes. Once executed successfully, the initial state of the blockchain changes to a final state. The EVMs run inside a program called “geth,” with every machine running a copy of geth.

zkEVM explained

Now, what is zero-knowledge EVM or zkEVM? The EVM equivalent of the zero-knowledge rollups that help scale the Ethereum network. Simple? Not quite. The zk rollups bundle up several Ethereum transactions in Layer 1 (what we call the base Ethereum layer or L1) and roll them up to Layer 2 (L2), which sits on top of Layer 1. Now, a zkEVM, which is Ethereum-compatible, allows the network to implement the L1 smart contracts directly on these rollups. This means emulating the bytecodes running on the original EVM on zkEVM.

By doing so, the existing applications running on EVM can be transported to L2 and executed. So, the basic idea behind the development of zkEVM was to scale everything (whatever we can do on Layer 1 EVM or the original EVM) on the Layer 2 zkEVM along with bringing in scalability, and that too while not compromising the security provided by L1. After all, we want it all: scalability, security, and decentralization: the famous blockchain trilemma that we get to hear so often these days.

Compatible with zero-knowledge circuits

Along with rolling up the L1 transactions, the zkEVM also generates zero-knowledge validity proof for this rolled-up data and then transfers this proof back to Layer 1 for verification (verifying that the proof produced by the zkEVM in L1 is indeed true/valid). When these proofs are verified on L1, the state of the roll-ups changes on L1.

When the concept of EVM had initially come into existence, zero-knowledge was not addressed, and the original EVM didn’t run on zero-knowledge circuits. zkEVM came into being to do the needed, i.e., provide zero-knowledge validity proofs for the rolled-up transactions in L2 and then send this proof back to L1 for verification.

Compatible with original EVM

The zkEVM is fully compatible with the original Solidity-based opcodes written for the original EVM. But simply emulating all the existing opcodes into zkEVM that can directly run them is an upheaval task. For this, the concept of tailor-made micro opcodes was introduced by Polygon Hermez, giving rise to microVM (uVM), which eases the process of implementing certain variable EVM codes (such as CREATE and CALL).

By executing this set of uVM assembly codes, the state of the blockchain changes to a new state, just like in EVM.

zkEVM vs. EVM

Polygon zkEVM has some clear plus points over the original EVM:

  • Throughput: As the transactions are bundled or rolled up, the number of transactions executed per second gets increases significantly. With zkEVM, the throughput has roughly increased to 2000 TPS.

  • Lower gas fee: The batches of transactions executed together result in the gas fee going down considerably.

  • Security: Since all the opcodes of the EVM are emulated in zkEVM, the security of L1 is passed onto L2.

  • Cheaper: The zk-rollups ensure that minimal call data is posted back to L1, making the overall transaction cost go down

  • Faster Finality: The transactions in zkEVM give faster finality times, i.e. time taken to finalize the transactions before they can be called irreversible is much less than in an L1 blockchain.

Closing Thoughts

Polygon recently released Polygon zkEVM, the future of Ethereum scaling. Through zkEVM, users will see dramatically reduced costs and improved speed. The EVM equivalence of Polygon zkEVM allows devs to BUIDL build on Polygon the same way they would on Ethereum, deploying Eth smart contracts and dApps.

About Polygon DAO

Polygon DAO is the centerpiece of Polygon’s long-term strategy of progressively decentralizing the ecosystem's growth to the community. Polygon DAO aims to represent and support various areas of interest within the Polygon ecosystem. Through Polygon Village, developers gain access to everything they need to build, grow, and showcase their Web3 initiatives; projects building on Polygon receive comprehensive, quality support.

Stay in the Loop

Twitter | Discord | Telegram | Village

Subscribe to Polygon Village
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.