-
Consensus contract, which was initially
PolygonZkEVM.solhas now been upgraded toPolygonZkEVMEtrog.sol. - zkNode, consisting of the synchronizer, sequencer, aggregator, and RPC.
- zkProver for generating verifiable proofs of correct transaction executions.
- zkEVM bridge for cross-chain messaging and transferring assets.

Consensus contract
The earlier version, Polygon Hermez 1.0, was based on the Proof of Donation (PoD) consensus mechanism. PoD was basically a decentralized auction conducted automatically, with participants (coordinators) bidding a certain number of tokens in order to be selected for creating batches. The updated consensus contract is designed to build upon the insights gained from PoD in v1.0 and adds support for permissionless participation of multiple coordinators in producing L2 batches. In the PoD mechanism, economic incentives were structured to require validators to operate with high efficiency to remain competitive. The latest version of the zkEVM consensus contract (deployed on Layer 1) is modeled after the Proof of Efficiency. While the protocol design is intended to support permissionless participation of multiple coordinators to generate L2 batches, for security reasons and given the protocol’s early development stage, only one coordinator (referred to as the Sequencer) is currently operational. Implementation model
Unlike the PoD, the Consensus Contract employs a simpler technique and is favoured due to its greater efficiency in resolving the challenges involved in PoD. The strategic implementation of the contract-based consensus ensures that the network:- Maintains its permissionless feature to produce L2 batches.
- Is highly efficient, a criterion which is key for the overall network performance.
- Attains an acceptable degree of decentralization.
- Is protected from malicious attacks, especially by validators.
- Maintains a fair balance between overall validation effort and network value.
Onchain data availability
A full zk-rollup schema requires onchain publication of both the transaction data (which users need to reconstruct the full state) and the validity proofs (zero-knowledge proofs). However, given Ethereum’s current framework, publishing callback data to L1 incurs high gas fees, complicating the decision between opting for a full zk-rollup or a hybrid configuration. Under a Hybrid schema, either of the following is possible:- Validium: Data is stored off-chain and only the validity proofs are published onchain.
- Volition: For some transactions, both the data and the validity proofs are published onchain, while in others, only the proofs are stored onchain.
PolygonZkEVMEtrog.sol
The underlying protocol in zkEVM ensures that the state transitions are correct by employing a validity proof.
In order to ensure adherence to a set of pre-determined rules for state transitions, the consensus contract deployed on L1, is utilized.
The consensus contract is currently deployed on both Ethereum mainnet and Cardona testnet.
- The sequencer proposes transaction batches to the network upon executing them. That is, it rolls up transactions into batches and adds them to the consensus contract.
- The aggregator checks the validity of the transaction batches and provides validity proofs.
- Firstly, to receive batches from the sequencer.
- Secondly to aggregators, requesting batches to be validated.

Although the current protocol design allows for several sequencers and aggregators, to prioritize security and given the early stage of protocol development, only one sequencer and one aggregator are currently operational.These are henceforth referred to as the trusted sequencer and the trusted aggregator.
zkNode
zkNode is the essential software for running a zkEVM node. It is a client that the network requires to implement the synchronization and govern the roles of the participants, including the trusted sequencer and the trusted aggregator. The consensus smart contract imposes the following requirements on the trusted sequencer and the trusted aggregator. Sequencer
- The trusted sequencer must run the software necessary for a full zkEVM node.
- The trusted sequencer should pay a fee in the form of POL tokens for the right to create and process batches.
- The trusted sequencer is incentivized to propose valid batches (consisting of valid transactions) with the fees paid by the network users who initiated the transactions.
Aggregator
A trusted aggregator receives all the transaction information from the trusted sequencer and sends it to the prover, which in turn provides a zk-proof after performing some complex computations. A special verfier smart contract validates the validity proof. The trusted aggregator’s task is to therefore:- Provide validity proofs for the L2 transactions proposed by the trusted sequencer.
- Run zkEVM’s zkNode software and the zkProver for generating zero-knowledge validity proofs.
- For a given batch, the trusted aggregator earns the POL fees (paid by the trusted sequencer) for providing a validity proof.
- In a decentralized setting, each trusted aggregator needs to declare its intention to validate transactions, and subsequently compete to produce validity proofs based on its own strategy.
Incentivization structure
The two permissionless participants of the zkEVM network are the trusted sequencer and the trusted aggregator. Proper incentive structures have been devised to keep the zkEVM network fast and secure. Below is a summary of the fee structure for the trusted sequencer and the trusted aggregator:-
Sequencer
- Collects transactions from a designated pool DB and puts them in a batch.
- Receives fees paid by users who submitted the transactions.
- Pays L1 transaction fees + POL (depending on pending batches).
- The POL tokens go to the trusted aggregator.
- Profitable if:
txs fees>L1 call+POLfee.
-
Aggregator
- Processes transactions published by the trusted sequencer.
- Builds zkProof.
- Receives POL tokens from the trusted sequencer.
- Static cost: L1 call cost + server cost (to build a proof).
- Profitable if:
POL fees>L1 call cost+server cost
zkProver
zkEVM employs zero-knowledge technology to generate validity proofs. It uses a zero-knowledge prover (zkProver), which is intended to run on a server and is being engineered to be compatible with most consumer hardware. The trusted aggregator uses the zkProver to validate batches and provide validity proofs. The zkProver consists of a main state machine executor, a collection of secondary state machines (some with their own executor), a STARK-proof builder, and a SNARK-proof builder.