# Polynomial Markdown version of https://l2beat.com/layer2s/projects/polynomial ## Summary **Warning:** This project is archived and no longer maintained. **Warning:** Critical contracts can be upgraded by an EOA which could result in the loss of all funds. - Total Value Secured: $0.00 (0.00% compared to seven days ago; canonically bridged $0.00, natively minted $0.00, externally bridged $0.00; 0.00% with additional trust assumptions compared to the tokens involved and the Stage assigned to the project's canonical messaging bridge) - Gas token: ETH - Type: Other - Purposes: Universal, Exchange - Host chain: Ethereum - Chain ID: 8008 ### Risks - Sequencer failure: Self sequence (sentiment: good) - State validation: Fraud proofs (INT) (sentiment: bad) - Data availability: Onchain (sentiment: good) - Exit window: None (sentiment: bad) - Proposer failure: Cannot withdraw (sentiment: bad) ### About Polynomial Chain is a derivatives chain that addresses liquidity fragmentation with a unified liquidity layer, enabling innovative derivatives. ## Value Secured Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/polynomial#tvs). - [TVS chart (JSON)](https://l2beat.com/api/scaling/tvs/polynomial) - [TVS breakdown by token (JSON)](https://l2beat.com/api/scaling/tvs/polynomial/breakdown) ## Activity Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/polynomial#activity). - [Activity chart (JSON)](https://l2beat.com/api/scaling/activity/polynomial) ## Onchain costs Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/polynomial#onchain-costs). ## Data posted Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/polynomial#data-posted). ## Liveness Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/polynomial#liveness). ## Milestones & Incidents - 2024-07-16: [Polynomial Chain announced](https://x.com/PolynomialFi/status/1813259120629457403). Polynomial Chain announced on X. ## Risk summary ### Funds can be stolen if 1. a contract receives a malicious code upgrade. There is no delay on code upgrades, (CRITICAL) 2. no whitelisted challenger disputes an invalid state root before the challenge window expires (CRITICAL). ### MEV can be extracted if 3. the operator exploits their centralized position and frontruns user transactions. ## Risk analysis **Warning:** Critical contracts can be upgraded by an EOA which could result in the loss of all funds. ### Sequencer failure Self sequence (sentiment: good) 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) (sentiment: bad) Fraud proofs allow actors watching the chain to prove that the state is incorrect. Interactive proofs (INT) require multiple transactions over time to resolve. Only one entity is currently allowed to propose and submit challenges, as only permissioned games are currently allowed. ### Data availability Onchain (sentiment: good) All of the data needed for proof construction is published on Ethereum L1. ### Exit window None (sentiment: bad) There is no window for users to exit in case of an unwanted upgrade since contracts are instantly upgradable. ### Proposer failure Cannot withdraw (sentiment: bad) Only the whitelisted proposers can publish state roots on L1, so in the event of failure the withdrawals are frozen. ## Stage Polynomial is not even a Stage 0 project. ### Stage 0 - [x] A complete and functional proof system is deployed. - [ ] Fraud proof submission is not sufficiently decentralized. - [x] The project calls itself a rollup. - [x] State roots are posted to Ethereum L1. - [x] Inputs for the state transition function are posted to Ethereum L1. - [x] A source-available node exists that can recreate the state from Ethereum L1 data. Please note that the L2BEAT team has not verified the validity of the node source code. [View code](https://github.com/ethereum-optimism/optimism/tree/develop/op-node) ### Stage 1 - [ ] Principle: Compromising ≥75% of the Security Council should be the only way (other than bugs) for a rollup to indefinitely block an L2→L1 message (e.g. a withdrawal) or push an invalid L2→L1 message (e.g. an invalid withdrawal) with a <7d exit window. - [ ] Users' withdrawals can be censored by the permissioned operators. - [ ] Upgrades executed by actors with more centralized control than a Security Council provide less than 7d for users to exit if the permissioned operator is down or censoring. - [x] The sources of all programs used are public and program hashes can be independently regenerated. ### Stage 2 - [ ] Fraud proof submission is open only to whitelisted actors. - [ ] Upgrades unrelated to onchain provable bugs provide less than 30d to exit. - [ ] The Security Council's actions are not confined to onchain provable bugs. ## Data availability ### 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. **References** - [Derivation: Batch submission - OP Mainnet specs](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/derivation.md#batch-submission) - [BatchInbox - address](https://etherscan.io/address/0x0bd57e83B5E0f9eCD84d559bB58e1EcFEEdD2565#code) - [OptimismPortal2.sol - source code, depositTransaction function](https://etherscan.io/address/0x7Cf803296662e8C72A6C1d6450572209aCF7f202#code) ## State derivation ### Node software The rollup node is composed of two software components: [op-node](https://github.com/ethereum-optimism/optimism/tree/develop/op-node), implementing consensus related logic, and [op-geth](https://github.com/ethereum-optimism/op-geth), implementing execution logic. The configuration file can be found [here](https://api.conduit.xyz/file/v1/optimism/rollup/polynomial-mainnet-0). ### Compression scheme Data batches are compressed using the [zlib](https://github.com/madler/zlib) algorithm with best compression level. ### Genesis state The genesis file can be found [here](https://api.conduit.xyz/file/v1/optimism/genesis/polynomial-mainnet-0). ### Data format The format specification of Sequencer's data batches can be found [here](https://optimism.io/blog/here-s-how-you-can-reproduce-op-mainnet-s-migration-to-bedrock). ## State validation Updates to the system state can be proposed and challenged by permissioned operators only. 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.0 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. **Risks** - Funds can be stolen if no whitelisted challenger disputes an invalid state root before the challenge window expires (CRITICAL). **References** - [OP stack specification: Fault Dispute Game](https://specs.optimism.io/fault-proof/stage-one/fault-dispute-game.html#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 0.00 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](https://medium.com/l2beat/fraud-proof-wars-b0cb4d0f452a). 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](https://specs.optimism.io/fault-proof/stage-one/fault-dispute-game.html#freeloader-claims)), an inherited clock with too little time remaining is generally extended by 3h. The extension is 6h when the next claim is immediately before split depth 30, and 1d 3h (the standard extension plus the 1d oracle challenge period) immediately before the last depth. Along a full-depth path, cumulative extensions can therefore add up to 10d 3h. 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](https://github.com/ethereum-optimism/optimism/blob/develop/docs/security-reviews/2024_08_Fault-Proofs-No-MIPS_Spearbit.pdf)). **References** - [Fraud Proof Wars: OPFP](https://medium.com/l2beat/fraud-proof-wars-b0cb4d0f452a) ## Upgrades & Governance ## Updates Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/polynomial#updates). ## 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. **Risks** - 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. **References** - [Sequencing Window - OP Mainnet Specs](https://github.com/ethereum-optimism/optimism/blob/51eeb76efeb32b3df3e978f311188aa29f5e3e94/specs/glossary.md#sequencing-window) - [OptimismPortal2.sol - source code, depositTransaction function](https://etherscan.io/address/0x7Cf803296662e8C72A6C1d6450572209aCF7f202#code) ## 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. **References** - [OptimismPortal2.sol - Etherscan source code, proveWithdrawalTransaction function](https://etherscan.io/address/0x7Cf803296662e8C72A6C1d6450572209aCF7f202#code) - [OptimismPortal2.sol - Etherscan source code, finalizeWithdrawalTransaction function](https://etherscan.io/address/0x7Cf803296662e8C72A6C1d6450572209aCF7f202#code) ### 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, including forced withdrawals from L1 and regular messages initiated on L2. Once the force operation is submitted and if the request is serviced, the operation follows the flow of a regular message. **References** - [Forced withdrawal from an OP Stack blockchain](https://docs.optimism.io/stack/transactions/forced-transaction) ## 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. **References** - [Introducing EVM Equivalence](https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306) ## Permissions ### Ethereum #### Actors ##### Conduit Multisig 1 Addresses: [0x4a4962275DF8C60a80d3a25faEc5AA7De116A746](https://etherscan.io/address/0x4a4962275DF8C60a80d3a25faEc5AA7De116A746) A Multisig with 4/10 threshold. * Can upgrade **with no delay** * SuperchainConfig [via: ProxyAdmin] * Can interact with SuperchainConfig * Allowed to pause withdrawals. In op stack systems with a proof system, the Guardian can also blacklist dispute games and set the respected game type (permissioned / permissionless) * Can interact with SystemConfig * it can update the preconfer address, the batch submitter (Sequencer) address and the gas configuration of the system ##### EOA 1 Addresses: [0x1b99D8a4CE6883FA9Fc3538Ea518a4628aaC6135](https://etherscan.io/address/0x1b99D8a4CE6883FA9Fc3538Ea518a4628aaC6135) * Can upgrade **with no delay** * OptimismPortal2 [via: ProxyAdmin] * AnchorStateRegistry [via: ProxyAdmin] * L1CrossDomainMessenger [via: ProxyAdmin] * L1StandardBridge [via: ProxyAdmin] * SystemConfig [via: ProxyAdmin] * DelayedWETH [via: ProxyAdmin] * OptimismMintableERC20Factory [via: ProxyAdmin] * L1ERC721Bridge [via: ProxyAdmin] * DisputeGameFactory [via: ProxyAdmin] * Can interact with AddressManager * set and change address mappings [via: ProxyAdmin] ##### EOA 2 Addresses: [0x67a44CE38627F46F20b1293960559eD85Dd194F1](https://etherscan.io/address/0x67a44CE38627F46F20b1293960559eD85Dd194F1) * Can interact with SystemConfig * Allowed to commit transactions from the current layer to the host chain ## Smart contracts ### Ethereum #### OptimismPortal2 Addresses: [0x034cbb620d1e0e4C2E29845229bEAc57083b04eC](https://etherscan.io/address/0x034cbb620d1e0e4C2E29845229bEAc57083b04eC#code), [0x7Cf803296662e8C72A6C1d6450572209aCF7f202](https://etherscan.io/address/0x7Cf803296662e8C72A6C1d6450572209aCF7f202#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) 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 PermissionedDisputeGame. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### SystemConfig Addresses: [0x58b51fb9FeeD00DD846f91D265Eba3cdd855A413](https://etherscan.io/address/0x58b51fb9FeeD00DD846f91D265Eba3cdd855A413#code), [0x2fA28989fc559836E9d66dFf3010C7F7f41c65ED](https://etherscan.io/address/0x2fA28989fc559836E9d66dFf3010C7F7f41c65ED#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) Contains configuration parameters such as the Sequencer address, gas limit on this chain and the unsafe block signer address. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 * **batcherHash**: EOA 2 * **owner**: Conduit Multisig 1 Can be upgraded by: EOA 1 with no delay #### DisputeGameFactory Addresses: [0xe9394679d0f0676E4a2dE99F8ed6B4aCb16c5f0f](https://etherscan.io/address/0xe9394679d0f0676E4a2dE99F8ed6B4aCb16c5f0f#code), [0x74Fac1D45B98bae058F8F566201c9A81B85C7D50](https://etherscan.io/address/0x74Fac1D45B98bae058F8F566201c9A81B85C7D50#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) The dispute game factory allows the creation of dispute games, used to propose state roots and eventually challenge them. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### SuperchainConfig Addresses: [0x097f99768A0a4a0A81bAbbCB1ea18193bA9D53cC](https://etherscan.io/address/0x097f99768A0a4a0A81bAbbCB1ea18193bA9D53cC#code), [0xE4F9779ab53070a55db24dFAeFf9AF147c6ED550](https://etherscan.io/address/0xE4F9779ab53070a55db24dFAeFf9AF147c6ED550#code) (Implementation (Upgradable)), [0xb4899FF43Ae727B1E9CB19AC44660e4A43Fad0b5](https://etherscan.io/address/0xb4899FF43Ae727B1E9CB19AC44660e4A43Fad0b5#code) (Admin) This is NOT the shared SuperchainConfig contract of the OP stack Superchain but rather a local fork. It manages pause states for each chain connected to it, as well as a global pause state for all chains. The guardian role can pause either separately, but each pause expires after 3mo 1d if left untouched. * Roles: * **admin**: ProxyAdmin; ultimately Conduit Multisig 1 * **guardian**: Conduit Multisig 1 Can be upgraded by: Conduit Multisig 1 with no delay #### L1CrossDomainMessenger Addresses: [0x36725a5e0040deB7C697d46C0e24390702b202e0](https://etherscan.io/address/0x36725a5e0040deB7C697d46C0e24390702b202e0#code), [0xb686F13AfF1e427a1f993F29ab0F2E7383729FE0](https://etherscan.io/address/0xb686F13AfF1e427a1f993F29ab0F2E7383729FE0#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) 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. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### L1StandardBridge Addresses: [0x3Be64BF2b9C2dE637067C7AAb6baE5EDf9fEBA55](https://etherscan.io/address/0x3Be64BF2b9C2dE637067C7AAb6baE5EDf9fEBA55#code), [0x61525EaaCDdB97D9184aFc205827E6A4fd0Bf62A](https://etherscan.io/address/0x61525EaaCDdB97D9184aFc205827E6A4fd0Bf62A#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) The main entry point to deposit ERC20 tokens from host chain to this chain. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### L1ERC721Bridge Addresses: [0xD5890BBAFaFdce942597757385E55174569e8d1A](https://etherscan.io/address/0xD5890BBAFaFdce942597757385E55174569e8d1A#code), [0x74f1aC50EB0BE98853805D381C884f5f9abDEcf9](https://etherscan.io/address/0x74f1aC50EB0BE98853805D381C884f5f9abDEcf9#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) Used to bridge ERC-721 tokens from host chain to this chain. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### PermissionedDisputeGame Addresses: [0x027b8405077e4C8de33E31Ca2EF7ceE97a8D4a3b](https://etherscan.io/address/0x027b8405077e4C8de33E31Ca2EF7ceE97a8D4a3b#code) Same as FaultDisputeGame, but only two permissioned addresses are designated as proposer and challenger. #### AnchorStateRegistry Addresses: [0x0df4Aa3C6CCCd0efdDC37324BC251511ff6034F8](https://etherscan.io/address/0x0df4Aa3C6CCCd0efdDC37324BC251511ff6034F8#code), [0xeb69cC681E8D4a557b30DFFBAd85aFfD47a2CF2E](https://etherscan.io/address/0xeb69cC681E8D4a557b30DFFBAd85aFfD47a2CF2E#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) Contains the latest confirmed state root that can be used as a starting point in a dispute game. It specifies which game type can be used for withdrawals, which currently is the PermissionedDisputeGame. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### PreimageOracle Addresses: [0x1fb8cdFc6831fc866Ed9C51aF8817Da5c287aDD3](https://etherscan.io/address/0x1fb8cdFc6831fc866Ed9C51aF8817Da5c287aDD3#code) The PreimageOracle contract is used to load the required data from L1 for a dispute game. #### ProxyAdmin Addresses: [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) * Roles: * **owner**: EOA 1 #### MIPS Addresses: [0x6463dEE3828677F6270d83d45408044fc5eDB908](https://etherscan.io/address/0x6463dEE3828677F6270d83d45408044fc5eDB908#code) The MIPS contract is used to execute the final step of the dispute game which objectively determines the winner of the dispute. #### DelayedWETH Addresses: [0x6b18508c693b9c45A23eAf382E07ADd81D4d4819](https://etherscan.io/address/0x6b18508c693b9c45A23eAf382E07ADd81D4d4819#code), [0x33Dadc2d1aA9BB613A7AE6B28425eA00D44c6998](https://etherscan.io/address/0x33Dadc2d1aA9BB613A7AE6B28425eA00D44c6998#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (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. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### OptimismMintableERC20Factory Addresses: [0x994233366C8E11da5c525AB903c04e7AFB2915bD](https://etherscan.io/address/0x994233366C8E11da5c525AB903c04e7AFB2915bD#code), [0x8ee6fB13c6c9a7e401531168E196Fbf8b05cEabB](https://etherscan.io/address/0x8ee6fB13c6c9a7e401531168E196Fbf8b05cEabB#code) (Implementation (Upgradable)), [0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f](https://etherscan.io/address/0x3c68b1d45f4faa4F028c3DC8910fA3247c7f0a1f#code) (Admin) 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 OptimismMintableERC20 as this chain's representation of a token on the host chain, or vice-versa. * Roles: * **admin**: ProxyAdmin; ultimately EOA 1 Can be upgraded by: EOA 1 with no delay #### ProxyAdmin Addresses: [0xb4899FF43Ae727B1E9CB19AC44660e4A43Fad0b5](https://etherscan.io/address/0xb4899FF43Ae727B1E9CB19AC44660e4A43Fad0b5#code) * Roles: * **owner**: Conduit Multisig 1 The current deployment carries some associated risks: - Funds can be stolen if a contract receives a malicious code upgrade. There is no delay on code upgrades (CRITICAL).