Search

Search for projects by name

Polygon zkEVM logoPolygon zkEVM

Badges

About

Polygon zkEVM is an EVM-compatible ZK Rollup built by Polygon Labs.


Value secured
$48.31 M10.9%
Canonically Bridged
$44.74 M
Externally Bridged
$1.10 M
Natively Minted
$2.46 M

  • Tokens
  • Past day UOPS
    0.1612.8%
  • 30D ops count
    330.60 K

  • Stage
  • Type
    ZK Rollup
  • Purpose
    Universal
  • Sequencer failureState validationData availabilityExit windowProposer failure

    Badges

    About

    Polygon zkEVM is an EVM-compatible ZK Rollup built by Polygon Labs.

    Value Secured
    Canonical
    External
    Native
    Activity
    Polygon zkEVM
    Ethereum
    Onchain costs

    The section shows the operating costs that L2s pay to Ethereum.


    Calldata
    Blobs
    Compute
    Overhead

    Milestones & Incidents

    Polygon zkEVM Etrog upgrade

    2024 Feb 13th

    Polygon zkEVM is upgraded to the Polygon Etrog version.

    Learn more

    Polygon zkEVM Mainnet Beta is Live

    2023 Mar 27th

    Polygon zkEVM public beta launched.

    Learn more
    Risk summary
    The forced transaction mechanism is currently disabled.
    Risk analysis
    The forced transaction mechanism is currently disabled.
    Sequencer failureState validationData availabilityExit windowProposer failure

    Sequencer failure

    No mechanism

    There is no mechanism to have transactions be included if the sequencer is down or censoring. Although the functionality exists in the code, it is currently disabled.

    State validation

    ZK proofs (ST, SN)

    STARKs and SNARKs are zero knowledge proofs that ensure state correctness. STARKs proofs are wrapped in SNARKs proofs for efficiency. SNARKs require a trusted setup.

    Data availability

    Onchain

    All of the data needed for proof construction is published on Ethereum L1. Unlike most ZK rollups transactions are posted instead of state diffs.

    Exit window

    None
    The Security Council can remove the delay on upgrades.

    Even though there is a 3d Timelock for upgrades, forced transactions are disabled.

    Proposer failure

    Cannot withdraw

    Only the whitelisted proposers can publish state roots on L1, so in the event of failure the withdrawals are frozen.

    Rollup stagePolygon zkEVMPolygon zkEVM is a
    Stage 0
    ZK Rollup.

    Learn more about Rollup stages
    Please keep in mind that these stages do not reflect rollup security, this is an opinionated assessment of rollup maturity based on subjective criteria, created with a goal of incentivizing projects to push toward better decentralization. Each team may have taken different paths to achieve this goal.
    Technology

    Validity proofs ensure state correctness

    Each update to the system state must be accompanied by a ZK proof that ensures that the new state was derived by correctly applying a series of valid user transactions to the previous state. These proofs are then verified on Ethereum by a smart contract.

    1. PolygonRollupManager.sol - source code, _verifyAndRewardBatches function

    Zero knowledge STARK and SNARK cryptography is used

    Despite their production use zkSTARKs and zkSNARKs proof systems are still relatively new, complex and they rely on the proper implementation of the polynomial constraints used to check validity of the Execution Trace. In addition zkSNARKs require a trusted setup to operate.

    • Funds can be lost if the proof system is implemented incorrectly.

    1. PolygonZkEVMEtrog.sol - Etherscan source code, verifyBatches function

    All transaction data is recorded on chain

    All executed transactions are submitted to an on chain smart contract. The execution of the rollup is based entirely on the submitted transactions, so anyone monitoring the contract can know the correct state of the rollup chain.

    1. PolygonZkEVMEtrog.sol - Etherscan source code, sequenceBatches function
    Learn more about the DA layer here: Ethereum logoEthereum
    State derivation
    Node software

    Node software can be found here.

    Compression scheme

    No compression scheme yet.

    Genesis state

    The genesis state, whose corresponding root is accessible as Batch 0 root in the _legacyBatchNumToStateRoot variable of PolygonRollupManager, is available here.

    Data format

    The trusted sequencer batches transactions according to the specifications documented here.

    State validation

    Each update to the system state must be accompanied by a ZK proof that ensures that the new state was derived by correctly applying a series of valid user transactions to the previous state. These proofs are then verified on Ethereum by a smart contract.


    Prover Architecture

    Polygon zkEVM proof system PIL-STARK can be found here.

    ZK Circuits

    Polygon zkEVM circuits are built from PIL and are designed to replicate the behavior of the EVM. The source code can be found here.

    • Funds can be lost if the proof system is implemented incorrectly.

    Verification Keys Generation

    SNARK verification keys can be generated and checked against the Ethereum verifier contract using this guide. The system requires a trusted setup.

    Operator

    The system has a centralized sequencer

    Only a trusted sequencer is allowed to submit transaction batches. A mechanism for users to submit their own batches is currently disabled.

    • MEV can be extracted if the operator exploits their centralized position and frontruns user transactions.

    • Funds can be frozen if the sequencer refuses to include an exit transaction (CRITICAL).

    1. PolygonZkEVMEtrog.sol - source code, onlyTrustedSequencer modifier

    Users can't force any transaction

    The mechanism for allowing users to submit their own transactions is currently disabled.

    • Users can be censored if the operator refuses to include their transactions.

    1. PolygonZkEVMEtrog.sol - source code, forceBatchAddress address
    Withdrawals

    Regular messaging

    The user initiates L2->L1 messages by submitting a regular transaction on this chain. When the block containing that transaction is settled, the message becomes available for processing on L1. ZK proofs are required to settle blocks.

    1. PolygonZkEvmBridgeV2.sol - source code, claimAsset function
    Upgrades & Governance
    A diagram of the upgrades and governance
    A diagram of the upgrades and governance

    The regular upgrade process for all system contracts (shared and L2-specific) starts at the PolygonAdminMultisig. For the shared contracts, they schedule a transaction that targets the ProxyAdmin via the Timelock, wait for 3d and then execute the upgrade. An upgrade of the Layer 2 specific rollup- or validium contract requires first adding a new rollupType through the Timelock and the RollupManager (defining the new implementation and verifier contracts). Now that the rollupType is created, either the local admin or the PolygonAdminMultisig can immediately upgrade the local system contracts to it.

    The PolygonSecurityCouncil can expedite the upgrade process by declaring an emergency state. This state pauses both the shared bridge and the PolygonRollupManager and allows for instant upgrades through the timelock. Accordingly, instant upgrades for all system contracts are possible with the cooperation of the SecurityCouncil. The emergency state has been activated 1 time(s) since inception.

    Furthermore, the PolygonAdminMultisig is permissioned to manage the shared trusted aggregator (proposer and prover) for all participating Layer 2s, deactivate the emergency state, obsolete rolupTypes and manage operational parameters and fees in the PolygonRollupManager directly. The local admin of a specific Layer 2 can manage their chain by choosing the trusted sequencer, manage forced batches and set the data availability config. Creating new Layer 2s (of existing rollupType) is outsourced to the PolygonCreateRollupMultisig but can also be done by the PolygonAdminMultisig. Custom non-shared bridge escrows have their custom upgrade admins listed in the permissions section.

    Permissions

    Ethereum

    Roles:

    Sequencer 0x148E…2800

    Allowed to commit transactions from the current layer to the host chain.

    Trusted Aggregator (Proposer) (2) 0x20A5…51dE0x6329…f7ab

    Permissioned to post new state roots and global exit roots accompanied by ZK proofs.

    Actors:

    PolygonZkEvmEscrowsMultisig 0xf694…E904
    • A Multisig with 5 / 10 threshold.
    • Can upgrade the implementation of daiBridge, usdcBridge, wstETHBridge.
    PolygonAdminMultisig 0x242d…3e21
    • A Multisig with 2 / 3 threshold.
    • Can act on behalf of PolygonZkEVMTimelock if there is no emergency state, in which case there is no delay with 3d delay.
    • Is allowed to interact with PolygonRollupManager - deploy new projects that use predefined rollup types (implementations) and connect them to the PolygonRollupManager.
    • Is allowed to interact with PolygonRollupManager - manage all access control roles, add new rollup types (which are implementation contracts that can then be upgraded to by connected projects), update any connected projects to new rollup types and rollback batches, connect existing rollups to the PolygonRollupManager - acting via PolygonZkEVMTimelock with 3d delay if there is no emergency state, in which case there is no delay.
    • Is allowed to interact with PolygonRollupManager - manage parameters like fees for all connected projects, set the trusted aggregator, stop the emergency state, update projects and obsolete rollup types.
    • Is allowed to interact with PolygonZkEVMTimelock - propose, cancel and execute transactions in the timelock, manage all access control roles - acting via PolygonZkEVMTimelock with 3d delay if there is no emergency state, in which case there is no delay.
    • Is allowed to interact with PolygonZkEVMTimelock - propose, cancel and execute transactions in the timelock, manage all access control roles.
    • Can upgrade the implementation of PolygonZkEVMBridgeV2, PolygonRollupManager, PolygonZkEVMGlobalExitRootV2 - acting via SharedProxyAdmin, PolygonZkEVMTimelock with 3d delay if there is no emergency state, in which case there is no delay.

    Used in:

    PolygonSecurityCouncil 0x37c5…Dcb6
    • A Multisig with 6 / 8 threshold.
    • Is allowed to interact with PolygonRollupManager - activate the emergency state in the PolygonRollupManager and in the shared bridge immediately, effectively pausing all projects connected to them and making system contracts instantly upgradable.

    Used in:

    PolygonCreateRollupMultisig 0xC74e…79dB
    • A Multisig with 3 / 8 threshold.
    • Is allowed to interact with PolygonRollupManager - deploy new projects that use predefined rollup types (implementations) and connect them to the PolygonRollupManager.

    Used in:

    Smart contracts
    A diagram of the smart contract architecture
    A diagram of the smart contract architecture

    Ethereum

    Custom Bridge escrow for DAI bridged to PolygonZkEVM allowing for a custom L2 tokens contract. This contract stores the following tokens: DAI, sDAI.

    The main system contract defining the polygon zkEVM Layer 2 logic. Entry point for sequencing batches.

    Custom Bridge escrow for USDC bridged to PolygonZkEVM allowing for a custom L2 tokens contract. This contract stores the following tokens: USDC.

    FflonkVerifier_11 0xc521…2883

    Verifies ZK proofs for state roots of this Layer 2 via the PolygonRollupManager.

    Custom Bridge escrow for wstETH bridged to PolygonZkEVM allowing for a custom L2 tokens contract. This contract stores the following tokens: wstETH.

    SharedProxyAdmin 0x0F99…CC4A

    Can be used to upgrade implementation of PolygonZkEVMBridgeV2, PolygonRollupManager, PolygonZkEVMGlobalExitRootV2.

    Implementation used in:

    The shared bridge contract, escrowing user funds sent to Layer 2s perticipating in the AggLayer. It is mirrored on each L2 and can be used to transfer both ERC20 assets and arbitrary messages. This contract can store any token.

    Proxy used in:

    The central shared managing contract for Layer 2s on the Polygon AggLayer. This contract receives L2 state roots as well as ZK proofs. All connected Layer 2s can be globally paused by activating the ‘Emergency State’. This can be done by the PolygonSecurityCouncil or by anyone after 1 week of inactive verifiers.

    Proxy used in:

    A merkle tree storage contract aggregating state roots of each participating Layer 2, thus creating a single global merkle root representing the global state of the AggLayer, the ‘global exit root’. The global exit root is synchronized to all connected Layer 2s to help with their interoperability.

    Proxy used in:

    PolygonZkEVMTimelock 0xEf14…A4EF
    • A timelock with access control. In the case of an activated emergency state in the PolygonRollupManager, all transactions through this timelock are immediately executable. The current minimum delay is 3d.
    • Can act on behalf of SharedProxyAdmin.
    • Can act on behalf of PolygonZkEVMTimelock if there is no emergency state, in which case there is no delay with 3d delay.
    • Can be used to interact with PolygonRollupManager - manage all access control roles, add new rollup types (which are implementation contracts that can then be upgraded to by connected projects), update any connected projects to new rollup types and rollback batches, connect existing rollups to the PolygonRollupManager.
    • Can be used to interact with PolygonZkEVMTimelock - propose, cancel and execute transactions in the timelock, manage all access control roles.

    Implementation used in:

    Value Secured is calculated based on these smart contracts and tokens:

    Proxy used in:

    Custom Bridge escrow for DAI bridged to PolygonZkEVM allowing for a custom L2 tokens contract.

    Custom Bridge escrow for USDC bridged to PolygonZkEVM allowing for a custom L2 tokens contract.

    Custom Bridge escrow for wstETH bridged to PolygonZkEVM allowing for a custom L2 tokens contract.

    The current deployment carries some associated risks:

    • Funds can be stolen if a contract receives a malicious code upgrade. There is a 3d delay on code upgrades unless upgrade is initiated by the PolygonSecurityCouncil in which case there is no delay.

    Knowledge nuggets