Search

Search for projects by name

ZKsync Era logoZKsync Era

Badges

About

ZKsync Era is a general-purpose ZK Rollup with full EVM compatibility.


Value secured
$905.89 M20.6%
Canonically Bridged
$377.20 M
Externally Bridged
$12.63 M
Natively Minted
$516.05 M

  • Tokens
  • Past day UOPS
    1.300.02%
  • 30D ops count
    4.31 M

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

    Badges

    About

    ZKsync Era is a general-purpose ZK Rollup with full EVM compatibility.

    Value Secured
    Canonical
    External
    Native
    Activity
    ZKsync Era
    Ethereum
    Onchain costs

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


    Calldata
    Blobs
    Compute
    Overhead

    Milestones & Incidents

    Onchain Governance Launch

    2024 Sep 12th

    An onchain Governance system is introduced, including a Security Council and Guardians.

    Learn more

    ZKsync Protocol Upgrade v24

    2024 Jun 6th

    A protocol upgrade that introduces a shared bridge and the foundation for other ZK stack chains.

    Learn more
    Risk summary
    Risk analysis
    Sequencer failureState validationData availabilityExit windowProposer failure

    Sequencer failure

    Enqueue via L1

    Users can submit transactions to an L1 queue, but can’t force them. The sequencers cannot selectively skip transactions but can stop processing the queue entirely. In other words, if the sequencers censor or are down, they are so for everyone.

    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 (SD)

    All of the data (SD = state diffs) needed for proof construction is published onchain.

    Exit window

    None

    There is no window for users to exit in case of an unwanted standard upgrade because the central operator can censor withdrawal transactions by implementing a TransactionFilterer with no delay. The standard upgrade delay is 4d 3h.

    Proposer failure

    Cannot withdraw

    Only the whitelisted proposers can publish state roots on L1, so in the event of failure the withdrawals are frozen. There is a decentralized Governance system that can attempt changing Proposers with an upgrade.

    Rollup stageZKsync EraZKsync Era 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

    All data required for proofs is published on chain

    All the data that is used to construct the system state is published on chain in the form of cheap blobs or calldata. This ensures that it will be available for enough time.

    State derivation
    Node software

    The node software is open-source, and its source code can be found here. The main node software does not rely on Layer 1 (L1) to reconstruct the state, but you can use this tool for that purpose. Currently, there is no straightforward method to inject the state into the main node, but ZKsync is actively working on a solution for this.

    Compression scheme

    Bytecodes undergo compression before deployment on Layer 1 (L1). You can find additional information on this process here.

    Genesis state

    There have been neither genesis states nor regenesis.

    Data format

    Details on data format can be found 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

    ZKsync Era proof system Boojum can be found here and contains essential tools like the Prover, the Verifier, and other backend components. The specs of the system can be found here.

    ZK Circuits

    ZKsync Era circuits are built from Boojum and are designed to replicate the behavior of the EVM. The source code can be found here. The circuits are checked against tests that 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 tool. The system requires a trusted setup.

    Operator

    The system has a centralized operator

    The operator is the only entity that can propose blocks. A live and trustworthy operator is vital to the health of the system.

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

    Users can force any transaction via L1

    If a user is censored by the L2 Sequencer, they can try to force their transaction via an L1 queue. Right now there is no mechanism that forces L2 Sequencer to include transactions from the queue in an L2 block. The operator can implement a TransactionFilterer that censors forced transactions.

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

    • Users can be censored if the operator implements a TransactionFilterer, which is possible without delay.

    1. L1 - L2 interoperability - Developer's documentation
    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. Withdrawing funds - ZKsync documentation

    Forced messaging

    If the user experiences censorship from the operator with regular L2->L1 messaging they can submit their messages directly on L1. The system is then obliged to service this request or halt all messages from L1, including all forced withdrawals and deposits. Once the force operation is submitted and if the request is serviced, the operation follows the flow of a regular message.

    Upgrades & Governance
    A diagram of the upgrades and governance
    A diagram of the upgrades and governance

    There are two main paths for contract upgrades in the shared ZK stack ecosystem - standard and emergency - both converging on the shared upgrade proxy contract ProtocolUpgradeHandler. The standard path involves a governance proposal and voting through the DAO, multiple timelock delays and finally approval by the Guardians or 6 SecurityCouncil participants. The emergency path allows for contract upgrades without any delay by the EmergencyUpgradeBoard, which acts as a 3/3 Multisig between SecurityCouncil, Guardians and the FoundationMultisig.

    Standard path

    On ZKsync Era

    Delegates can start new proposals by reaching a threshold of 21M ZK tokens on the ZKsync Era Rollup’s ZkProtocolGovernor contract. This launches a 7d ‘voting delay’ after which the 7d voting period starts. During these first two periods, the proposal can be canceled by the proposer or if it falls below the proposing threshold. A proposal is only successful if it reaches both quorum (630M ZK tokens) and simple majority. When it reaches quorum, the voting period is reset to 7d. In the successful case, it can be queued in the 0s timelock which forwards it to Ethereum as an L2->L1 log.

    On Ethereum

    After the execution of the proposal-containing batch (3h delay), the proposal is now picked up by the ProtocolUpgradeHandler and enters the 3d ‘legal veto period’. This serves as a window in which a veto could be coordinated offchain, to be then enforced by non-approval of Guardians and SecurityCouncil. A threshold of 2 Guardians can extend the veto period to 7d. After this a proposal enters a waiting state of 30d, from which it can be immediately approved (cancelling the delay) by 6 participants of the SecurityCouncil. For the unlikely case that the SC does not approve here, the Guardians can instead approve the proposal, or nobody. In the two latter cases, the waiting period is enforced in full. A proposal cannot be actively cancelled in the ProtocolUpgradeHandler, but will be expired if not approved within the waiting period. An approved proposal now enters the pendingExecution state for a final delay of 1d, and can then be executed.

    Other governance tracks

    There are two other tracks of Governance also starting with DAO Delegate proposals the ZKsync Era rollup: 1) Token Program Proposals that add new minters, allocations or upgrade the ZK token and 2) Governance Advisory Proposals that e.g. change the ZK Credo or other offchain Governance Procedures without onchain targets. The protocol for these two other tracks is similar to the first part of the standard path described above (albeit having different quorum and timelock values), and not passing over to the Ethereum L1. Further customizations are that the ZkFoundationMultisig can propose to the ZkTokenGovernor without a threshold and that the Guardians’ L2 alias can cancel proposals in the ZkTokenGovernor and the ZkGovOpsGovernor.

    Emergency path

    SecurityCouncil (9 / 12), Guardians (5 / 8) and ZkFoundationMultisig (3 / 5) form a de-facto 3/3 Multisig by pushing an immediate upgrade proposal through the EmergencyUpgradeBoard, which circumvents all delays and executes immediately via the ProtocolUpgradeHandler.

    Upgrade Delays

    The cumulative duration of the upgrade paths from the moment of a voted ‘successful’ proposal is 4d 3h or 8d 3h (depending on Guardians extending the LegalVetoPeriod) for Standard, 0 for Emergency and 34d 3h for the path in which the SecurityCouncil is not approving the proposal.

    Freezing

    The SecurityCouncil can freeze (pause withdrawals and settlement) all chains connected to the current StateTransitionManager. Either for a softFreeze of 12h or a hardFreeze of 7d. After a softFreeze and / or a hardFreeze, a proposal from the EmergencyUpgradeBoard has to be passed before subsequent freezes are possible. Only the SecurityCouncil can unfreeze an active freeze.

    Elastic Chain Operator and ChainAdmin

    Apart from the paths that can upgrade all shared implementations, the ZK stack governance system defines other roles that can modify the system: A single Elastic Chain operator role that governs parameters in the shared contracts and a ChainAdmin role (in the chain-specific diamond contract) for managing parameters of each individual Hyperchain that builds on the stack. These chain-specific actions include setting a transaction filterer that can censor L1 -> L2 messages, setting fee parameters and adding / removing Validators in the ValidatorTimelock. ZKsync Era’s ChainAdmin differs from the others as it also has the above Elastic Chain Operator role in the shared ZK stack contracts.

    Permissions

    Ethereum

    Roles:

    Actors permissioned to call the functions to commit, prove, execute and revert L2 batches through the ValidatorTimelock in the main Diamond contract.

    Actors:

    Governance 0x0b62…3F61
    • Old Governance contract for ZKsync Era allowing for proposals in form of transactions. The minimum delay is 0s.
    • Is allowed to interact with ValidatorTimelockOld - set addresses (validators) that can commit, prove, execute, revert batches through this contract.
    ValidatorTimelock 0x5D8b…d06E
    • Intermediary contract between the Validators and the central diamond contract that delays block execution (ie withdrawals and other L2 --> L1 messages) by 3h.
    • Is allowed to interact with ZKsync - commit, prove, execute, revert batches directly in the main Diamond contract. This role is typically held by a proxying ValidatorTimelock.

    Used in:

    ValidatorTimelockOld 0xa8CB…c1bD
    • Intermediary contract between the Validators and the ZKsync Era diamond that delays block execution (ie withdrawals and other L2 --> L1 messages) by 21h. This contract is a remnant from pre Elastic Chain times.
    • Is allowed to interact with ZKsync - commit, prove, execute, revert batches directly in the main Diamond contract. This role is typically held by a proxying ValidatorTimelock.
    Matter Labs Multisig 0x4e49…7828
    • A Multisig with 4 / 7 threshold.
    • Can act on behalf of EraAdminProxy.
    • Is allowed to interact with BridgeHub - register new tokens in the BridgeHub and create new chains sharing the Elastic Chain contracts - acting via EraAdminProxy.
    • Is allowed to interact with StateTransitionManager - manage the shared ValidatorTimelock contract address, revert batches and set permissioned validators for all chains connected to the StateTransitionManager - acting via EraAdminProxy.
    • Is allowed to interact with L1SharedBridge - register new Elastic Chains in the shared bridge - acting via EraAdminProxy.

    Used in:

    SecurityCouncil 0xBDFf…De0D
    • A Multisig with 9 / 12 threshold.
    • Custom Multisig implementation that has a general threshold of 9 but also specific thresholds for upgrade approvals (6) or soft freezes (3).
    • Is allowed to interact with ProtocolUpgradeHandler - soft freeze, hard freeze, approve a protocol upgrade.

    Used in:

    1. Security Council members - ZK Nation docs
    Guardians 0xD677…A888
    • A Multisig with 5 / 8 threshold.
    • Custom Multisig implementation that has a general threshold of 5 and a specific threshold for extending the legal voting period of 2.
    • Is allowed to interact with ProtocolUpgradeHandler - extend the legal veto period, approve a protocol upgrade.

    Used in:

    1. Guardians - ZK Nation docs
    EmergencyUpgradeBoard 0xdEFd…9b29
    • A custom contract allowing a 3/3 of SecurityCouncil, ZkFoundationMultisig and Guardians to executeEmergencyUpgrade() via the ProtocolUpgradeHandler.
    • Can act on behalf of ProtocolUpgradeHandler.
    • Can upgrade the implementation of BridgeHub, StateTransitionManager, L1SharedBridge - acting via ProxyAdmin, ProtocolUpgradeHandler.

    Used in:

    GnosisSafe 0x0153…9057
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0xb799…415d

    Used in:

    GnosisSafe 0x13f0…5A66
    • A Multisig with 1 / 1 threshold.
    • Member of SecurityCouncil.

    Participants (1):

    0x2A71…3DAf

    Used in:

    GnosisSafe 0x178D…fC6D
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0xa376…B001

    Used in:

    GnosisSafe 0x2A90…5384
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0x1606…A430

    Used in:

    GnosisSafe 0x34Ea…C93a
    • A Multisig with 1 / 2 threshold.
    • Member of SecurityCouncil.

    Participants (2):

    0xd20a…21c70x1462…D697

    Used in:

    GnosisSafe 0x35eA…653F
    • A Multisig with 2 / 5 threshold.
    • Member of SecurityCouncil.

    Used in:

    GnosisSafe 0x3888…E26F
    • A Multisig with 1 / 2 threshold.
    • Member of SecurityCouncil.

    Participants (2):

    0xB107…55DF0xEE8f…3b4E

    Used in:

    GnosisSafe 0x5386…2c0f
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0x2272…47A9

    Used in:

    GnosisSafe 0x55c6…E857
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0xD9b0…1A6d

    Used in:

    GnosisSafe 0x5909…bF69
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0x0e62…1bcf

    Used in:

    GnosisSafe 0x6D26…a5f0
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0x3620…4f0f

    Used in:

    GnosisSafe 0x7250…FA8A
    • A Multisig with 1 / 1 threshold.
    • Member of SecurityCouncil.

    Participants (1):

    0x6F2A…eAD6

    Used in:

    GnosisSafe 0x84BF…E6E0
    • A Multisig with 2 / 5 threshold.
    • Member of SecurityCouncil.

    Used in:

    GnosisSafe 0x9B39…cA88
    • A Multisig with 1 / 3 threshold.
    • Member of SecurityCouncil.

    Used in:

    GnosisSafe 0x9B8B…A803
    • A Multisig with 1 / 7 threshold.
    • Member of SecurityCouncil.

    Used in:

    GnosisSafe 0xB7aC…ca44
    • A Multisig with 1 / 3 threshold.
    • Member of SecurityCouncil.

    Used in:

    ZkFoundationMultisig 0xbC16…B51c

    A Multisig with 3 / 5 threshold.

    Used in:

    GnosisSafe 0xc3Ab…A23e
    • A Multisig with 1 / 5 threshold.
    • Member of SecurityCouncil.

    Used in:

    GnosisSafe 0xCe7a…f6cf
    • A Multisig with 1 / 1 threshold.
    • Member of Guardians.

    Participants (1):

    0x8b0c…013D

    Used in:

    GnosisSafe 0xFB90…C231
    • A Multisig with 1 / 1 threshold.
    • Member of SecurityCouncil.

    Participants (1):

    0x2F73…Ea6f

    Used in:

    ProtocolTimelockController(L2->L1) 0x3701…e6A8

    Is allowed to interact with ProtocolUpgradeHandler - start (queue) upgrades.

    ZKsync Era

    Actors:

    ZkTokenGovernor 0x1056…6E89
    • Governance contract allowing for token voting (simple majority) with the ZK token through delegates. This contract is used for Token Program Proposals (TPPs) usually targeting the ZK token on ZKsync Era. At least 21M ZK tokens are necessary to start a proposal (for delegates) and a 630M quorum of voted tokens must be met to succeed.
    • Can act on behalf of TokenTimelockController.
    • Is allowed to interact with TokenTimelockController - cancel queued transactions.
    • Is allowed to interact with TokenTimelockController - execute transactions that are ready.
    • Is allowed to interact with TokenTimelockController - propose transactions.
    • Is allowed to interact with ZkToken - grant the MINTER_ROLE to arbitrary addresses, thus controlling the minting of the ZK token - acting via TokenTimelockController with 3d delay.
    ZkGovOpsGovernor 0x4968…afAb
    • Governance contract allowing for token voting (simple majority) with the ZK token through delegates. This contract is used for Governance Advisory Proposals (GAPs) that are not executable onchain. At least 21M ZK tokens are necessary to start a proposal and a 630M quorum of voted tokens must be met to succeed.
    • Can act on behalf of GovOpsTimelockController.
    • Is allowed to interact with GovOpsTimelockController - cancel queued transactions.
    • Is allowed to interact with GovOpsTimelockController - execute transactions that are ready.
    • Is allowed to interact with GovOpsTimelockController - propose transactions.
    ZkProtocolGovernor 0x7670…e34f
    • Main Governance contract allowing for token voting (simple majority) with the ZK token through delegates. This contract is used for protocol upgrade proposals (ZIPs) that start on ZKsync Era, go through Ethereum Layer 1 and can - from there - target all L1 and L2 contracts. At least 21M ZK tokens are necessary to start a proposal and a 630M quorum of voted tokens must be met to succeed.
    • Can act on behalf of ProtocolTimelockController.
    • Is allowed to interact with ProtocolTimelockController - cancel queued transactions.
    • Is allowed to interact with ProtocolTimelockController - execute transactions that are ready.
    • Is allowed to interact with ProtocolTimelockController - propose transactions.
    ProtocolUpgradeHandler_l2Alias 0xA08b…29A8
    • Is allowed to interact with ZkToken - control all roles in the ZkToken access control, including the minter roles.
    • Can upgrade the implementation of ZkToken - acting via ZkTokenProxyAdmin.
    ZKFoundationMultisig_l2Alias 0xcd27…C62D

    Is allowed to interact with ZkTokenGovernor - make direct proposals without owning ZK tokens. In propose-guarded mode, this address is the ONLY allowed proposer. Propose-guarded mode is currently set to false.

    Guardians_l2Alias 0xe788…b999

    Is allowed to interact with ZkTokenGovernor, ZkGovOpsGovernor - cancel proposals while they are pending (after having been proposed) or active (during the voting period).

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

    Ethereum

    Verifier 0x06aa…EB66

    Implements the ZK proof verification logic.

    Implementation used in:

    The main contract defining the Layer 2. The operator commits blocks and provides a ZK proof which is validated by the Verifier contract and then processes transactions. During batch execution it processes L1 --> L2 and L2 --> L1 transactions. This contract stores the following tokens: ETH.

    Implementation used in:

    Bridge for depositing wrapped stETH (Lido) to ZKsync Era. These deposits and withdrawals do not go through the shared Bridge. This contract stores the following tokens: wstETH.

    Legacy bridge for depositing ERC20 tokens to ZKsync Era. Forwards deposits and withdrawals to the BridgeHub. This contract can store any token.

    EraAdminProxy 0x2cf3…5063
    • Can be used to interact with BridgeHub - register new tokens in the BridgeHub and create new chains sharing the Elastic Chain contracts.
    • Can be used to interact with StateTransitionManager - manage the shared ValidatorTimelock contract address, revert batches and set permissioned validators for all chains connected to the StateTransitionManager.
    • Can be used to interact with L1SharedBridge - register new Elastic Chains in the shared bridge.

    Implementation used in:

    Sits between the shared bridge and the StateTransitionManager(s) and relays L1 <-> L2 messages from the shared bridge or other ZK stack chains to their respective destinations.

    Can be upgraded by:

    Upgrade delay: No delay

    Proxy used in:

    GenesisUpgrade 0x6e2B…3971

    Helper contract that defines diamondcut data to initialize a new diamond implementation for the chain-specific system contracts.

    Implementation used in:

    ProtocolUpgradeHandler 0x8f7a…1897
    • The central upgrade contract and Governance proxy for all ZK stack contracts. Accepts successful DAO proposals from L2, emergency proposals from the EmergencyUpgradeBoard. The three members of the EmergencyUpgradeBoard also have special roles and permissions in this contract.
    • Can act on behalf of ProxyAdmin.

    Implementation used in:

    ProxyAdmin 0xC2a3…2cf1

    Can be used to upgrade implementation of BridgeHub, StateTransitionManager, L1SharedBridge.

    Implementation used in:

    Defines L2 diamond contract creation and upgrade data, the proof system for the ZKsync diamond contract connected to it (and other L2 diamond contracts that share the logic).

    Can be upgraded by:

    Upgrade delay: No delay

    Proxy used in:

    This bridge contract escrows all ERC-20s and ETH that are deposited to registered ZK stack chains like ZKsync Era. This contract can store any token.

    Can be upgraded by:

    Upgrade delay: No delay

    Proxy used in:

    ZKsync Era

    ProtocolTimelockController 0x3701…e6A8

    Timelock contract that can send L2->L1 transactions to start a proposal in the ProtocolUpgradeHandler on Ethereum (L2_SENDER_ROLE). This timelock has a minimum delay of 0s.

    TokenTimelockController 0x3E21…dDd6
    • Timelock contract allowing the queueing of transactions with a minimum delay of 3d.
    • Can be used to interact with ZkToken - grant the MINTER_ROLE to arbitrary addresses, thus controlling the minting of the ZK token.

    The ZK token contract on ZKsync Era. Mintable through access control roles. Used for voting in the ZK stack governance system.

    Upgrade delay: No delay

    GovOpsTimelockController 0xC3e9…7a19

    Timelock contract allowing the queueing of transactions with a minimum delay of 3d.

    ZkTokenProxyAdmin 0xdB1E…15CC

    Can be used to upgrade implementation of ZkToken.

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

    Shared bridge for depositing tokens to ZKsync Era and other ZK stack chains.

    Can be upgraded by:

    Upgrade delay: 4d 3h via the standard upgrade path, but immediate through the EmergencyUpgradeBoard.

    Proxy used in:

    Legacy bridge for depositing ERC20 tokens to ZKsync Era. Forwards deposits and withdrawals to the BridgeHub.

    Can be upgraded by:

    Upgrade delay: 4d 3h via the standard upgrade path, but immediate through the EmergencyUpgradeBoard.

    Bridge for depositing wrapped stETH (Lido) to ZKsync Era. These deposits and withdrawals do not go through the new shared BridgeHub.

    Can be upgraded by:

    Upgrade delay: No delay

    The current deployment carries some associated risks:

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

    Knowledge nuggets