What is Polygon zkEVM?

Ioannis Tsiokos
StakeBaby
Published in
10 min readApr 17, 2024
what is polygon zkEVM — introduction
What is polygon zkevm

The Polygon zkEVM is a massive leap over scalability and efficiency in the blockchain. ZK-EVM is the leading Layer 2 scaling solution directly designed to function on top of the Ethereum network, installed with Polygon firmly established as one of the top players in the space of blockchain infrastructure. Polygon is one of the most evident and used by the majority of blockchains in the world. In order to understand the full depth of the impact it delivers to the layers of complexity and levels of innovations it brings to the blockchain ecosystem, we will examine this in this article.

Ethereum hosted numerous decentralized applications (dApps), smart contracts, and a large number of blockchain innovations with its native Ethereum Virtual Machine (EVM). But the success of Ethereum acted like a sword on its own throat. Coupled with its wide usage, the network experiences serious congestion, with transaction speeds that are very slow, making it an unattractive platform to users and developers, due to very expensive transaction costs. The crypto industry is looking at how these boundaries are supposed to be overcome, yet without in fact losing the identical level of protection and decentralization features that brand Ethereum an appealing platform to commence with, and here is where Layer 2 solutions come into play.

Polygon zkEVM resolves these essential issues by rolling out a protocol that processes transactions off-chain and only interacts with the Ethereum mainnet for the finalization of processed transactions, helping maintain security and integrity. The “zero-knowledge” concept is very interesting as it brings cryptographic methods to prove the accuracy of transactions without leaking the actual data present in the transactions. This provides on-chain workload privacy.

How Does Polygon zkEVM Work?

what is polygon zkEVM — structure

To understand how Polygon zkEVM actually works, we have to trace the whole sequence of transactions from the initialization point down to the finalization point. This process includes several steps, each critical to achieving the scalability and efficiency for which Polygon zkEVM is known.

Transaction Initiation

It all starts when a user initiates a transaction on the Polygon zkEVM network. It can be anything from sending just money to actually conducting a rather sophisticated activity, such as using a smart contract for a transaction. The user signs those transactions with their private keys, so a digital signature is provided that clearly indicates the owner and shows intentions of the operation.

Transaction Aggregation

Once initiated, the transaction goes into the zkEVM mempool, which is a kind of holding area for all pending transactions. At the heart of it all lies the zkNode, the operational linchpin for Polygon zkEVM. zkNode will collect an ency of such pending transactions from the mempool and join them into a single batch. This is like when one compiles many documents into one file so that one can send a complete document in one file.

Off-Chain Execution and State Transition

The next step is to execute the off-chain transactions in a zkNode after aggregation. This step has most of the computation; it will run smart contracts and update the account state for the actions that have been defined by the transaction. It is to be taken into account that the state transitions happen in parallel to the Ethereum mainnet in a secured environment with the mirror of Ethereum state but not burdening the mainnet with computational load.

Zero-Knowledge Proof Generation

After processing a batch of transactions, the next step is to create a cryptographic proof. It is exactly at this point that the concept of “zero-knowledge” comes into play. In zkEVM, zk-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) will be generated for the whole batch of transactions using a specialized zkProver.

what is polygon zkEVM — zkEVM

This proof effectively attests the validity of outcomes of transactions and correct state transition triggered by the batch, but without revealing details about individual transactions. Such proof ensures the inexistence of invalid transactions and that the resulting state is both true and accurate — all without giving up the contents of the transaction. In essence, it allows the Polygon zkEVM to assert, “We’ve done the work correctly” without showing all the paperwork.

On-Chain Verification

As soon as the zk-SNARK has been created, it is to be submitted to the Ethereum mainnet. Cross-check the proof with the help of smart contract verifiers designed for this task. The work of computation to produce a proof is highly intensive, but it is relatively light in terms of verification resources. This is to say that the Ethereum mainnet can easily confirm the validity of the entire lot of transactions. This reduces the workload on Ethereum and is the crux of how Polygon zkEVM alleviates congestion and high fees.

Finalization and State Update

This proof is then established over the Ethereum network, and within it, the state changes are executed on-chain. This effectively ‘catches up’ the Ethereum blockchain to the new state determined through the off-chain computations. This means that the updated state would then be put on the Ethereum mainnet, effectively updating balances of accounts and smart contract data for users as if each of the transactions were processed independently on the mainnet.

what is polygon zkEVM — stakebaby validator

Are you staking your Polygon tokens yet? Consider staking with StakeBaby! We’re active developers and contributors in Web3, and by staking with us, you’ll support our efforts to build awesome tools, smart contracts, and content. Plus, you’ll earn delicious rewards!

The Role of zk-Rollups

Central to this broad process is the concept of zk-rollups. zk-Rollups is a kind of batch processing and proof generation, rolling multiple transaction outputs to a single one. They do this by allowing the network to process various transactions as one entity, thereby lessening the volume of data that has to be processed on-chain. The “rollup” part of the term refers to the rolling up of many off-chain transactions into a single proof — in essence, doing away with much of the work that otherwise would have been redundant, dispensing, or duplicative if treated on an individual basis.

Summary of Process Efficiency

It is able to achieve a spectacular increase in transaction throughput while cutting costs by offloading most of the computation work off-chain and consolidating transaction verification into a single proof. Instead of the Ethereum mainnet laboriously working its way through every transaction one by one, the zkEVM works its magic and simply presents the final verified proof for inclusion on the blockchain.

what is polygon zkEVM — polygon zkEVM stats

To make the lifecycle of transactions within zkEVM robust and trustless, a number of cryptographic and systemic checks have to be put in place. It is mathematically strong, built on zero-knowledge proofs with the security of the blockchain technology it runs on. zkEVM is ingeniously designed to strike a balance between scalability, privacy, and security that would set the pace for the mass adoption of EVM-based Ethereum applications without the traditionally attendant limitations.

Polygon zkEVM offers a re-imagination to the transaction process with its spirit, injecting into the Ethereum ecosystem the needed agility for modern applications, while adhering to the major tenets of decentralization and security that reside at the heart of blockchain technology.

Comparing Polygon zkEVM with Ethereum’s EVM

The Ethereum Virtual Machine (EVM) is one of the general-purpose execution engines in Ethereum. In addition, the EVM enables the running of smart contracts while at the same time allowing for execution of all decentralized applications (dApps) relating to the Ethereum network. As this popularity of Ethereum grew and adoption to the network began to take off rapidly, the first problem started cropping up with it: a high fee for transactions and longer processing times, due to network congestion. This is where the Polygon zkEVM comes into the picture, a Layer 2 scaling solution built to boost the EVM capacity of the base chain without compromising on Ethereum’s super-strong security and decentralization.

Throughput

Ethereum’s EVM: The throughput of Ethereum’s EVM is only limited by the block size and blockchain block time. It usually processes within the brackets of 15 to 30 transactions per second (TPS); hence, high peak demand times will find it normally congested. Consequently, users are applied with slow transaction speeds, and they need to pay even more gas to move up in the queue of transaction priority. This low throughput is one of the main obstacles of dApp scalability and a very bad factor to face for the user on the Ethereum mainnet.

what is polygon zkEVM — bytecode

Polygon zkEVM: In contrast, Polygon zkEVM offers a much higher throughput by using zero-knowledge rollups (zk-rollups). For example, Polygon’s zkEVM is off-chain transaction processing wherein it bundles hundreds or thousands of them into a batch, verifies with a cryptographic proof, then posts en masse on-chain. This largely augments the network’s ability to several orders of magnitude, allowing processing of thousands of TPS. This high throughput is hence the prime consideration that will enable the network to play host to a collection of high-volume, complexity dApps that would otherwise be infeasible on the Ethereum mainnet.

Cost

Ethereum’s EVM: Ethereum’s EVM translates to mean that with such high demand for the network bandwidth, gas fees are translated into a similar high cost. The gas charges change with the level of activity on the Ethereum network but spike users with very high costs during such peak congestions. These become exorbitant in nature for smart contract interactions of a complex nature, e.g., those that are part of decentralized finance (DeFi) platforms. Hence, they can easily discourage small transactions, pricing out many users.

Polygon zkEVM: Polygon zkEVM, through its rollup-centric approach, significantly reduces the cost of transactions. This significantly reduces the on-chain computation and fees relevant to it because a large part of the computational work is pushed to the Layer 2, and what hits the Ethereum mainnet is only the verified proof and updated state. Thus, users can execute transactions and smart contract instructions at an order of magnitude lower cost than with EVM of Ethereum without security tradeoffs. This lower cost structure is not only a benefit to users but also a benefit for developers who would like to deploy and run dApps with high transaction volume, free of gas fees.

Ease of Use for Developers

EVM of Ethereum: The EVM of Ethereum is one of the most mature ecosystems and is widely used. It gives a rich toolset and libraries, along with one of the biggest developer communities, for any developer to build dApps. They point to the complexity of smart contract development, concerns about high cost, and slow performance as three core factors making it difficult for developers — particularly in applications with mass-market appeal — to ply their trade successfully.

Polygon zkEVM: The entire developer experience with Polygon zkEVM is supposed to be exactly like Ethereum’s EVM. It goes for “EVM equivalence,” wherein it tries to make sure that whatever smart contract is written for Ethereum functions just as fine on zkEVM, without some kind of alteration. It brings compatibility, which will dramatically lower the learning curve for developers already familiar with the infrastructure and tooling brought by Ethereum. The high throughput and low transaction costs should imply that developers are able to test and deploy more resilient dApps, without having to worry about performance bottlenecks or prohibitive costs.

what is polygon zkEVM — precompiled status

In addition, Polygon zkEVM brings vastly more tooling and infrastructure to this high-throughput, low-cost Layer 2 environment. It brings more APIs and SDKs, further resources that help developers make their dApps in an easier and more efficient way, and at the same time, it helps them scale it once it’s built. These will be integrated into the very familiar Ethereum development stack, where developers can leverage the best of both worlds: an already ripe ecosystem that Ethereum offers, including zkEVM from Polygon.

In practice, many choices boil down to the definite needs of the dApp and the priorities of the developer: whether to adopt EVM from Ethereum or go for zkEVM on Polygon. This also builds a very compelling case for exchanges or DeFi protocols with high user interaction on Polygon zkEVM for high-transaction throughput and low-cost applications, like gaming platforms. But for those applications that value absolute decentralization and security more than the throughput of transactions and the cost of these, it will most certainly continue to use the Ethereum mainnet, regardless of its limitations.

Wrapping Up

With such emerging technologies, it is highly likely that future deployments on the Ethereum mainnet will relax the imposed constraints in terms of throughput and cost issues, equivalent to the constraints imposed by continuous upgrades to Eth2. The continued development of Polygon zkEVM and other Layer 2 solutions is likely to bring about further improvement in its usability by the developers and hence the reduction of the experience gap between Layer 2 and mainnet.

Generally, this is considered a strategic shift in the blockchain ecosystem — into scaling solutions without the scale of decentralization or security suggested by Ethereum. This is to mean that when measured against the wider blockchain ecosystem, zkEVM needs to be understood not only as a piece of technology that reaches out to make user and developer experiences palatable but also as reaching out to widen the technologies and their applicability in diverse industries.

what is polygon zkEVM — stakebaby

Support our dedication to web3 and enjoy tasty rewards by staking with StakeBaby.

--

--

Ioannis Tsiokos
StakeBaby

I have nothing to say that’s nearly as cool as I am, except maybe… wow, I am dad!