Search

Search for projects by name

OP Mainnet logoOP Mainnet

Badges

About

OP Mainnet is an EVM-equivalent Optimistic Rollup. It aims to be fast, simple, and secure.


Value secured
$6.98 B0.57%
Canonically Bridged
$3.79 B
Externally Bridged
$397.32 M
Natively Minted
$2.79 B

  • Tokens
  • Daily UOPS
    9.882.57%
  • 30D ops count
    24.88 M

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

    Badges

    About

    OP Mainnet is an EVM-equivalent Optimistic Rollup. It aims to be fast, simple, and secure.

    Value Secured
    Canonical
    External
    Native
    Activity
    OP Mainnet
    Ethereum
    Onchain costs
    Calldata
    Blobs
    Compute
    Overhead
    Milestones & Incidents

    Fallback to permissioned proposals for 26 days.

    2024 Aug 16th

    OP Mainnet preventively disables the fraud proof system due to a bug for 26 days.

    Learn more

    OP Mainnet becomes Stage 1

    2024 Jun 10th

    OP Mainnet introduces fraud proofs and updates permissions.

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

    Sequencer failure

    Self sequence

    In the event of a sequencer failure, users can force transactions to be included in the project’s chain by sending them to L1. There can be up to a 12h delay on this operation.

    State validation

    Fraud proofs (INT)

    Fraud proofs allow actors watching the chain to prove that the state is incorrect. Interactive proofs (INT) require multiple transactions over time to resolve.

    Data availability

    Onchain

    All of the data needed for proof construction is published on Ethereum L1.

    Exit window

    None

    There is no exit window for users to exit in case of unwanted regular upgrades as they are initiated by the Security Council with instant upgrade power and without proper notice.

    Proposer failure

    Self propose

    Anyone can be a Proposer and propose new roots to the L1 bridge.

    Rollup stage
    OP MainnetOP Mainnet is a
    Stage 1
    Optimistic 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

    Fraud proofs ensure state correctness

    After some period of time, the published state root is assumed to be correct. During the challenge period, anyone is allowed to submit a fraud proof that shows that the state was incorrect.

    • Funds can be stolen if no validator checks the published state. Fraud proofs assume at least one honest and able validator.

    1. DisputeGameFactory.sol - Etherscan source code, create() function
    2. FaultDisputeGame.sol - Etherscan source code, attack() function

    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.

    1. Derivation: Batch submission - OP Mainnet specs
    2. BatchInbox - Etherscan address
    3. OptimismPortal.sol - Etherscan source code, depositTransaction function
    State derivation
    Node software

    The rollup node is composed of two software components: op-node, implementing consensus related logic, and op-geth, implementing execution logic. The configuration file can be found here.

    Compression scheme

    Data batches are compressed using the zlib algorithm with best compression level.

    Genesis state

    Since OP Mainnet has migrated from the OVM to Bedrock, a node must be synced using a data directory that can be found here. To reproduce the migration itself, see this guide.

    Data format

    The format specification of Sequencer’s data batches can be found here.

    State validation
    A diagram of the state validation
    A diagram of the state validation

    Updates to the system state can be proposed and challenged by anyone who has sufficient funds. If a state root passes the challenge period, it is optimistically considered correct and made actionable for withdrawals.


    State root proposals

    Proposers submit state roots as children of the latest confirmed state root (called anchor state), by calling the create function in the DisputeGameFactory. A state root can have multiple conflicting children. Each proposal requires a stake, currently set to 0.08 ETH, that can be slashed if the proposal is proven incorrect via a fraud proof. Stakes can be withdrawn only after the proposal has been confirmed. A state root gets confirmed if the challenge period has passed and it is not countered.

    1. OP stack specification: Fault Dispute Game
    Challenges

    Challenges are opened to disprove invalid state roots using bisection games. Each bisection move requires a stake that increases expontentially with the depth of the bisection, with a factor of 1.09493. The maximum depth is 73, and reaching it therefore requires a cumulative stake of 691.43 ETH from depth 0. Actors can participate in any challenge by calling the defend or attack functions, depending whether they agree or disagree with the latest claim and want to move the bisection game forward. Actors that disagree with the top-level claim are called challengers, and actors that agree are called defenders. Each actor might be involved in multiple (sub-)challenges at the same time, meaning that the protocol operates with full concurrency. Challengers and defenders alternate in the bisection game, and they pass each other a clock that starts with 3d 12h. If a clock expires, the claim is considered defeated if it was countered, or it gets confirmed if uncountered. Since honest parties can inherit clocks from malicious parties that play both as challengers and defenders (see freeloader claims), if a clock gets inherited with less than 3h, it generally gets extended by 3h with the exception of 6h right before depth 30, and 1d right before the last depth. The maximum clock extension that a top level claim can get is therefore 10d. Since unconfirmed state roots are independent of one another, users can decide to exit with a subsequent confirmed state root if the previous one is delayed. Winners get the entire losers’ stake, meaning that sybils can potentially play against each other at no cost. The final instruction found via the bisection game is then executed onchain in the MIPS one step prover contract who determines the winner. The protocol does not enforce valid bisections, meaning that actors can propose correct initial claims and then provide incorrect midpoints. The protocol can be subject to resource exhaustion attacks (Spearbit 5.1.3).

    1. Fraud Proof Wars: OPFP
    Operator

    The system has a centralized sequencer

    While forcing transaction is open to anyone the system employs a privileged sequencer that has priority for submitting transaction batches and ordering transactions.

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

    Users can force any transaction

    Because the state of the system is based on transactions submitted on the underlying host chain and anyone can submit their transactions there it allows the users to circumvent censorship by interacting with the smart contract on the host chain directly.

    1. Sequencing Window - OP Mainnet Specs
    2. OptimismPortal.sol - Etherscan source code, depositTransaction function
    Withdrawals

    Regular exits

    The user initiates the withdrawal by submitting a regular transaction on this chain. When a state root containing such transaction is settled, the funds become available for withdrawal on L1 after 3d 12h. Withdrawal inclusion can be proven before state root settlement, but a 7d period has to pass before it becomes actionable. The process of state root settlement takes a challenge period of at least 3d 12h to complete. Finally the user submits an L1 transaction to claim the funds. This transaction requires a merkle proof.

    1. OptimismPortal.sol - Etherscan source code, proveWithdrawalTransaction function
    2. OptimismPortal.sol - Etherscan source code, finalizeWithdrawalTransaction function

    Forced exit

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

    1. Forced withdrawal from an OP Stack blockchain
    Other considerations

    EVM compatible smart contracts are supported

    OP stack chains are pursuing the EVM Equivalence model. No changes to smart contracts are required regardless of the language they are written in, i.e. anything deployed on L1 can be deployed on L2.

    1. Introducing EVM Equivalence
    Upgrades & Governance
    A diagram of the upgrades and governance
    A diagram of the upgrades and governance

    All contracts are upgradable by the SuperchainProxyAdmin which is controlled by a 2/2 multisig composed by the Optimism Foundation and a Security Council. The Guardian role is assigned to the Security Council multisig, with a Safe Module that allows the Foundation to act through it to stop withdrawals in the whole Superchain, blacklist dispute games, or deactivate the fault proof system entirely in case of emergencies. The Security Council can remove the module if the Foundation becomes malicious. The single Sequencer actor can be modified by the OpFoundationOperationsSafe via the SystemConfig contract. The SuperchainProxyAdminOwner can recover dispute bonds in case of bugs that would distribute them incorrectly.

    At the moment, for regular upgrades, the DAO signals its intent by voting on upgrade proposals, but has no direct control over the upgrade process.

    Permissions

    The system uses the following set of permissioned addresses:

    Guardian is an actor allowed to pause deposits and withdrawals.

    • OpFoundationUpgradeSafe has the role if the number of SecurityCouncilMultisig members falls below 8
    • OpFoundationOperationsSafe has the role if not revoked by the Security Council
    Sequencer EOA 1

    Sequencer is an actor allowed to commit transactions from the current layer to the host chain.

    LivenessGuard 0x2442…4a25
    • Can change the configuration of LivenessModule - can remove members of SecurityCouncilMultisig inactive for 98d.
    • Modular contract to be used together with the LivenessModule. Tracks liveness / activity of Safe owners.

    Used in:

    SuperchainProxyAdminOwner 0x5a0A…3d2A
    • A Gnosis Safe with 2 / 2 threshold.
    • Can act on behalf of SuperchainProxyAdmin.
    • Can change the configuration of AddressManager - set and change address mappings - acting via SuperchainProxyAdmin.
    • Can upgrade the implementation of AnchorStateRegistry, DelayedWETH_PermissionedGames, SystemConfig, DelayedWETH_PermissionlessGames, L1ERC721Bridge, OptimismMintableERC20Factory, SuperchainConfig, OptimismPortal, DisputeGameFactory - acting via SuperchainProxyAdmin.
    • Can upgrade the implementation of L1StandardBridge - upgrading the bridge implementation can give access to all funds escrowed therein - acting via SuperchainProxyAdmin.

    Used in:

    OpFoundationUpgradeSafe 0x847B…9D92
    • A Gnosis Safe with 5 / 7 threshold.
    • Member of SuperchainProxyAdminOwner.
    • Can act on behalf of LivenessModule - takes ownership of SecurityCouncilMultisig if the number of SecurityCouncilMultisig members falls below 8.
    • Can change the configuration of SystemConfig - it can update the preconfer address, the batch submitter (Sequencer) address and the gas configuration of the system.
    • A Guardian - acting via GuardianMultisig, SecurityCouncilMultisig, LivenessModule if the number of SecurityCouncilMultisig members falls below 8.

    Used in:

    OpFoundationOperationsSafe 0x9BA6…6b3A
    • A Gnosis Safe with 5 / 7 threshold.
    • Can act on behalf of DeputyGuardianModule if not revoked by the Security Council.
    • A Guardian - acting via GuardianMultisig, DeputyGuardianModule if not revoked by the Security Council.

    Used in:

    SecurityCouncilMultisig 0xc281…Bd03
    • A Gnosis Safe with 10 / 13 threshold. It uses the following modules: LivenessModule (used to remove members inactive for 98d while making sure that the threshold remains above 75%. If the number of members falls below 8, the OpFoundationUpgradeSafe takes ownership of the multisig).
    • Member of GuardianMultisig, SuperchainProxyAdminOwner.
    • A Guardian - acting via GuardianMultisig.

    Used in:

    1. Security Council members - Optimism Collective Governance Forum
    GuardianMultisig 0x09f7…dAf2
    • A Gnosis Safe with 1 / 1 threshold. It uses the following modules: DeputyGuardianModule (allows the OpFoundationOperationsSafe, called the deputy guardian, to act on behalf of the Gnosis Safe).
    • Can act as a Guardian.

    Participants (1):

    SecurityCouncilMultisig

    Used in:

    GnosisSafe 0x42d2…9c64
    • A Gnosis Safe with 2 / 2 threshold.
    • Member of OpFoundationUpgradeSafe, OpFoundationOperationsSafe.

    Participants (2):

    0xb237…97A50x4665…7429

    Used in:

    The system consists of the following permissions on OP Mainnet:

    MintManagerOwner 0x2A82…3a26
    • A Gnosis Safe with 3 / 5 threshold.
    • Can change the configuration of MintManager - change the OP token owner to a different MintManager and therefore change the inflation policy.
    SuperchainProxyAdminOwner_L2Alias 0x6B1B…4E3b

    Can upgrade the implementation of DeployerWhitelist, L2CrossDomainMessenger, GasPriceOracle, L2StandardBridge, SequencerFeeVault, OptimismMintableERC20Factory, L1BlockNumber, L2ERC721Bridge, L1Block, L2ToL1MessagePasser, OptimismMintableERC721Factory, L2ProxyAdmin, BaseFeeVault, L1FeeVault, SchemaRegistry, EAS - acting via L2ProxyAdmin.

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

    The system consists of the following smart contracts on the host chain (Ethereum):

    L1DAITokenBridge 0x10E6…5f2F

    Custom Gateway for DAI deposits via canonical messaging. Deposited DAI is forwarded to a Vault contract.

    Contains the latest confirmed state root that can be used as a starting point in a dispute game.

    Can be upgraded by:

    Upgrade delay: No delay

    DelayedWETH_PermissionedGames 0x2142…ecbCImplementation (Upgradable)Admin

    Contract designed to hold the bonded ETH for each game. It is designed as a wrapper around WETH to allow an owner to function as a backstop if a game would incorrectly distribute funds.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    Contains configuration parameters such as the Sequencer address, gas limit on this chain and the unsafe block signer address.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    Sends messages from host chain to this chain, and relays messages back onto host chain. In the event that a message sent from host chain to this chain is rejected for exceeding this chain’s epoch gas limit, it can be resubmitted via this contract’s replay function.

    Implementation used in:

    FaultDisputeGame 0x27B8…B8f8

    Logic of the dispute game. When a state root is proposed, a dispute game contract is deployed. Challengers can use such contracts to challenge the proposed state root.

    DelayedWETH_PermissionlessGames 0x323d…bdF0Implementation (Upgradable)Admin

    Contract designed to hold the bonded ETH for each game. It is designed as a wrapper around WETH to allow an owner to function as a backstop if a game would incorrectly distribute funds.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    L1DAIEscrow 0x4671…6C65

    Stores DAI deposited from the attached L1DAITokenBridge. This contract stores the following tokens: DAI.

    SuperchainProxyAdmin 0x543b…fB04
    • Can be used to configure AddressManager - set and change address mappings.
    • Can be used to upgrade implementation of AnchorStateRegistry, DelayedWETH_PermissionedGames, SystemConfig, DelayedWETH_PermissionlessGames, L1ERC721Bridge, OptimismMintableERC20Factory, SuperchainConfig, OptimismPortal, DisputeGameFactory.
    • Can be used to upgrade implementation of L1StandardBridge - upgrading the bridge implementation can give access to all funds escrowed therein.

    Implementation used in:

    Used to bridge ERC-721 tokens from host chain to this chain.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    SynthetixBridgeEscrow 0x5Fd7…eF9f

    Custom escrow for SNX bridged via canonical messaging. This contract stores the following tokens: SNX.

    The MIPS contract is used to execute the final step of the dispute game which objectively determines the winner of the dispute.

    Implementation used in:

    A helper contract that generates OptimismMintableERC20 contracts on the network it’s deployed to. OptimismMintableERC20 is a standard extension of the base ERC20 token contract designed to allow the L1StandardBridge contracts to mint and burn tokens. This makes it possible to use an OptimismMintablERC20 as this chain’s representation of a token on the host chain, or vice-versa.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    Lido custom escrow for wstETH tokens that uses the canonical bridge for messaging but is governed externally. This contract stores the following tokens: wstETH.

    PermissionedDisputeGame 0x91a6…cb87

    Same as FaultDisputeGame, but only two permissioned addresses are designated as proposer and challenger.

    Used to manage global configuration values for multiple OP Chains within a single Superchain network. The SuperchainConfig contract manages the PAUSED_SLOT, a boolean value indicating whether the Superchain is paused, and GUARDIAN_SLOT, the address of the guardian which can pause and unpause the system.

    Can be upgraded by:

    Upgrade delay: No delay

    Proxy used in:

    The main entry point to deposit ERC20 tokens from host chain to this chain. This contract can store any token.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    PreimageOracle 0x9c06…E277

    The PreimageOracle contract is used to load the required data from L1 for a dispute game.

    Implementation used in:

    FeesCollector 0xa3d5…ADEa

    Collecting sequencer, base- and L1 fees from L2.

    The OptimismPortal contract is the main entry point to deposit funds from L1 to L2. It also allows to prove and finalize withdrawals. It specifies which game type can be used for withdrawals, which currently is the FaultDisputeGame. This contract stores the following tokens: ETH.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    AddressManager 0xdE1F…d81F

    Legacy contract used to manage a mapping of string names to addresses. Modern OP stack uses a different standard proxy system instead, but this contract is still necessary for backwards compatibility with several older contracts.

    Implementation used in:

    The dispute game factory allows the creation of dispute games, used to propose state roots and eventually challenge them.

    Can be upgraded by:

    Upgrade delay: No delay

    Implementation used in:

    The system consists of the following smart contracts on OP Mainnet:

    Legacy contract that was originally used to act as a whitelist of addresses allowed to the Optimism network. Fully unused and deprecated since the Bedrock upgrade.

    Upgrade delay: No delay

    The L2CrossDomainMessenger (L2xDM) contract sends messages from L2 to L1, and relays messages from L1 onto L2 with a system tx. In the event that a message sent from L2 to L1 is rejected for exceeding the L1 gas limit, it can be resubmitted via this contract’s replay function.

    Upgrade delay: No delay

    Provides the current gas price for L2 transactions.

    Upgrade delay: No delay

    The L2StandardBridge contract is the main entry point to deposit or withdraw ERC20 tokens from L2 to L1. This contract can store any token.

    Upgrade delay: No delay

    Collects the sequencer fees, which are withdrawable to the FeesCollector on L1.

    Upgrade delay: No delay

    Factory contract to create bridge compliant ERC20 IOU token representations of bridged L1 ERC20 tokens.

    Upgrade delay: No delay

    Simple contract that returns the latest L1 block number.

    Upgrade delay: No delay

    The L2ERC721Bridge contract is the main entry point to deposit or withdraw ERC721 tokens from L2 to L1. This contract can store any token.

    Upgrade delay: No delay

    Simple contract that returns information about the latest L1 block, which is derived permissionlessly from the L1 chain.

    Upgrade delay: No delay

    Contract used internally by the L2CrossDomainMessenger to send messages to L1, including withdrawals. It can also be used directly as a low-level interface.

    Upgrade delay: No delay

    OptimismMintableERC721Factory 0x4200…0017Implementation (Upgradable)Admin

    Factory contract to create bridge compliant ERC721 IOU token representations of bridged L1 ERC721 tokens.

    Upgrade delay: No delay

    Can be used to upgrade implementation of DeployerWhitelist, L2CrossDomainMessenger, GasPriceOracle, L2StandardBridge, SequencerFeeVault, OptimismMintableERC20Factory, L1BlockNumber, L2ERC721Bridge, L1Block, L2ToL1MessagePasser, OptimismMintableERC721Factory, L2ProxyAdmin, BaseFeeVault, L1FeeVault, SchemaRegistry, EAS.

    Upgrade delay: No delay

    Collects EIP-1559 base fees, which are withdrawable to the FeesCollector on L1.

    Upgrade delay: No delay

    Collects the L1 portion of the L2 transaction fees, which are withdrawable to the FeesCollector on L1.

    Upgrade delay: No delay

    Contracts to register schemas for the Ethereum Attestation Service (EAS).

    Upgrade delay: No delay

    Contract containing the main logic for the Ethereum Attestation Service (EAS).

    Upgrade delay: No delay

    The OP token contract. The minting policy is controlled by the MintManager.

    MintManager 0x5C4e…1005

    Controls the OP inflation rate, which is currently hardcoded to 2% annually.

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

    Implementation used in:

    Implementation used in:

    Escrow for DAI 0x4671…6C65

    DAI Vault for custom DAI Gateway managed by MakerDAO.

    Escrow for SNX 0x5Fd7…eF9f

    SNX Vault for custom SNX Gateway managed by Synthetix.

    wstETH Vault for custom wstETH Gateway. Fully controlled by Lido governance.

    The current deployment carries some associated risks:

    • Funds can be stolen if a contract receives a malicious code upgrade. Both regular and emergency upgrades must be approved by both the Security Council and the Foundation. There is no delay on regular upgrades.

    Knowledge nuggets