# Public Goods Network Markdown version of https://l2beat.com/layer2s/projects/publicgoodsnetwork ## Summary **Warning:** This project is archived and no longer maintained. **Warning:** PGN was sunset in June 2024 and the centralized operator stopped their service. The current canonical bridge escrow contracts are modified to allow for [withdrawals of ETH and ERC-20s based on a pre-configured merkle root](https://gov.gitcoin.co/t/updating-pgns-contract-to-make-funds-easier-to-claim/19569). - 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) - Type: Other - Purpose: Universal - Host chain: Ethereum ### Risks - Sequencer failure: Self sequence (sentiment: good) - State validation: None (sentiment: bad) - Data availability: External (sentiment: bad) - Exit window: None (sentiment: bad) - Proposer failure: Cannot withdraw (sentiment: bad) ### About Public Goods Network is an OP stack chain focused on funding public goods. ## Value Secured Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/publicgoodsnetwork#tvs). - [TVS chart (JSON)](https://l2beat.com/api/scaling/tvs/publicgoodsnetwork) - [TVS breakdown by token (JSON)](https://l2beat.com/api/scaling/tvs/publicgoodsnetwork/breakdown) ## Onchain costs Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/publicgoodsnetwork#onchain-costs). ## Milestones & Incidents - 2024-12-17: [PGN unpauses the bridge](https://app.blocksec.com/explorer/tx/eth/0x49a8691bef3d6a1434deaa801240af5aeeb4e95034a31564947b23ca6587d276). PGN unpauses the bridge after claiming contracts are updated. - 2024-12-10 (incident): [PGN starts sunset process](https://app.blocksec.com/explorer/tx/eth/0xaf8648b0e0a28902f7cfcc544d520a45d8df8217bba016c4a2f01aaf2bf39556). PGN starts its shutdown by pausing the bridge. - 2024-01-26: [PGN switches to Celestia](https://x.com/conduitxyz/status/1750596065609572398). - 2023-07-06: [Public Goods Network Launch](https://twitter.com/pgn_eth/status/1676972199423668228). The Public Goods Network is live on mainnet. ## Risk summary **Warning:** Fraud proof system is currently under development. Users need to trust the block proposer to submit correct L1 state roots. ### Funds can be stolen if 1. a contract receives a malicious code upgrade. There is no delay on code upgrades, (CRITICAL) 2. an invalid state root is submitted to the system (CRITICAL). ### Funds can be lost if 3. the sequencer posts an unavailable transaction root, (CRITICAL) 4. the data is not available on the external provider (CRITICAL). ### Funds can be frozen if 5. the centralized validator goes down. Users cannot produce blocks themselves and exiting the system requires new block production (CRITICAL). ### MEV can be extracted if 6. the operator exploits their centralized position and frontruns user transactions. ## Risk analysis **Warning:** Fraud proof system is currently under development. Users need to trust the block proposer to submit correct L1 state roots. ### 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 None (sentiment: bad) Currently the system permits invalid state roots. More details in project overview. ### Data availability External (sentiment: bad) Proof construction and state derivation fully rely on data that is posted on Celestia. Sequencer tx roots are not checked against the Blobstream bridge data roots onchain, but L2 nodes can verify data availability by running a Celestia light client. ### 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 Public Goods Network is not even a Stage 0 project. ### Stage 0 - [x] The project self-identifies as a Validium or Optimium. - [x] State roots are posted to Ethereum L1. - [ ] The proof system is still under development. - [x] A source-available node exists that can reconstruct the L2 state when DA is accessible. 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 to push a malicious upgrade, or sequencer+DA-committee collusion to withhold data and finalize invalid state roots, should be the only ways (other than bugs) to steal funds or block withdrawals indefinitely. - [ ] 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. ### Stage 2 - [ ] Upgrades unrelated to onchain provable bugs, including upgrades to the DA verifier, provide less than 30d to exit. ## Data availability ### Data is posted to Celestia Transactions roots are posted onchain and the full data is posted on Celestia. Since the Blobstream bridge is not used, availability of the data is not verified against Celestia validators, meaning that the Sequencer can single-handedly publish unavailable roots. If Celestia becomes unavailable, the sequencer falls back to Ethereum. **Risks** - Funds can be lost if the sequencer posts an unavailable transaction root (CRITICAL). - Funds can be lost if the data is not available on the external provider (CRITICAL). **References** - [Introducing Blobstream: streaming modular DA to Ethereum](https://blog.celestia.org/introducing-blobstream/) - [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/0xC1B90E1e459aBBDcEc4DCF90dA45ba077d83BFc5#code) - [OptimismPortal.sol - source code, depositTransaction function](https://etherscan.io/address/0x75A2AAc09C8A51Bdde7303B06F1aD2fFFcCf8c09#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://github.com/ethereum-optimism/superchain-registry/blob/v0.1.1/superchain/configs/mainnet/pgn.yaml). ### 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://github.com/ethereum-optimism/superchain-registry/tree/main/superchain/extra/genesis/mainnet). ### 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 ### No state validation OP Stack projects can use the OP fault proof system, already being deployed on some. This project though is not using fault proofs yet and is relying on the honesty of the permissioned Proposer and Challengers to ensure state correctness. The smart contract system permits invalid state roots. **Risks** - Funds can be stolen if an invalid state root is submitted to the system (CRITICAL). **References** - [L2OutputOracle.sol - source code, deleteL2Outputs function](https://etherscan.io/address/0x76983dfED43C7ae7ebB592A92Be2BE972cAE4348#code) ## Upgrades & Governance ## Updates Shown as an interactive chart or widget on [the HTML page](https://l2beat.com/layer2s/projects/publicgoodsnetwork#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. **References** - [L2OutputOracle.sol - source code, CHALLENGER address](https://etherscan.io/address/0x76983dfED43C7ae7ebB592A92Be2BE972cAE4348#code) - [L2OutputOracle.sol - source code, PROPOSER address](https://etherscan.io/address/0x76983dfED43C7ae7ebB592A92Be2BE972cAE4348#code) ### 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) - [OptimismPortal.sol - source code, depositTransaction function](https://etherscan.io/address/0x75A2AAc09C8A51Bdde7303B06F1aD2fFFcCf8c09#code) ## 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. The process of block finalization takes a challenge period of 7d to complete. **Risks** - Funds can be frozen if the centralized validator goes down. Users cannot produce blocks themselves and exiting the system requires new block production (CRITICAL). **References** - [OptimismPortal.sol - source code, proveWithdrawalTransaction function](https://etherscan.io/address/0x75A2AAc09C8A51Bdde7303B06F1aD2fFFcCf8c09#code) - [OptimismPortal.sol - source code, finalizeWithdrawalTransaction function](https://etherscan.io/address/0x75A2AAc09C8A51Bdde7303B06F1aD2fFFcCf8c09#code) - [L2OutputOracle.sol - source code, PROPOSER check](https://etherscan.io/address/0x76983dfED43C7ae7ebB592A92Be2BE972cAE4348#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/12 threshold. * Can upgrade **with no delay** * BalanceClaimer [via: ProxyAdmin] * SystemConfig [via: ProxyAdmin] * L1CrossDomainMessenger [via: ProxyAdmin] * L2OutputOracle [via: ProxyAdmin] * OptimismPortal [via: ProxyAdmin] * L1StandardBridge [via: ProxyAdmin] * Can interact with AddressManager * set and change address mappings [via: ProxyAdmin] * Can interact with SystemConfig * it can update the preconfer address, the batch submitter (Sequencer) address and the gas configuration of the system ##### PgnMultisig Addresses: [0x39E13D1AB040F6EA58CE19998edCe01B3C365f84](https://etherscan.io/address/0x39E13D1AB040F6EA58CE19998edCe01B3C365f84) A Multisig with 3/8 threshold. * Can interact with L2OutputOracle * Allowed to challenge or delete state roots proposed by a Proposer * Can interact with OptimismPortal * 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) ##### BalanceClaimer Addresses: [0x0Ca4C7A370E0155c77a33e78443a54D749E0BC21](https://etherscan.io/address/0x0Ca4C7A370E0155c77a33e78443a54D749E0BC21) Allows proving ERC20 and/or ETH balances of L2 accounts with a merkle proof and without having to trigger a withdrawal transaction on the L2. The merkle root is immutable and set upon creation of this contract. * Can interact with OptimismPortal * withdraw ETH escrowed in the OptimismPortal * Can interact with L1StandardBridge * withdraw ERC-20 tokens escrowed in the bridge ##### EOA 1 Addresses: [0x69968Ce0E92d9c101BAd81de55EFbcb69603cFe3](https://etherscan.io/address/0x69968Ce0E92d9c101BAd81de55EFbcb69603cFe3) * Can interact with L2OutputOracle * Allowed to post new state roots of the current layer to the host chain ##### EOA 2 Addresses: [0x99526b0e49A95833E734EB556A6aBaFFAb0Ee167](https://etherscan.io/address/0x99526b0e49A95833E734EB556A6aBaFFAb0Ee167) * Can interact with SystemConfig * Allowed to commit transactions from the current layer to the host chain ## Smart contracts ### Ethereum #### SystemConfig Addresses: [0x7Df716EAD1d83a2BF35B416B7BC84bd0700357C9](https://etherscan.io/address/0x7Df716EAD1d83a2BF35B416B7BC84bd0700357C9#code), [0x463B3777d3DD6a90234b594D1f94002267CE7948](https://etherscan.io/address/0x463B3777d3DD6a90234b594D1f94002267CE7948#code) (Implementation (Upgradable)), [0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4](https://etherscan.io/address/0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4#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 Conduit Multisig 1 * **batcherHash**: EOA 2 * **owner**: Conduit Multisig 1 Can be upgraded by: Conduit Multisig 1 with no delay #### L2OutputOracle Addresses: [0xA38d0c4E6319F9045F20318BA5f04CDe94208608](https://etherscan.io/address/0xA38d0c4E6319F9045F20318BA5f04CDe94208608#code), [0x76983dfED43C7ae7ebB592A92Be2BE972cAE4348](https://etherscan.io/address/0x76983dfED43C7ae7ebB592A92Be2BE972cAE4348#code) (Implementation (Upgradable)), [0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4](https://etherscan.io/address/0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4#code) (Admin) Contains a list of proposed state roots which Proposers assert to be a result of block execution. Currently only the PROPOSER address can submit new state roots. * Roles: * **admin**: ProxyAdmin; ultimately Conduit Multisig 1 * **challenger**: PgnMultisig * **proposer**: EOA 1 Can be upgraded by: Conduit Multisig 1 with no delay #### OptimismPortal Addresses: [0xb26Fd985c5959bBB382BAFdD0b879E149e48116c](https://etherscan.io/address/0xb26Fd985c5959bBB382BAFdD0b879E149e48116c#code), [0x75A2AAc09C8A51Bdde7303B06F1aD2fFFcCf8c09](https://etherscan.io/address/0x75A2AAc09C8A51Bdde7303B06F1aD2fFFcCf8c09#code) (Implementation (Upgradable)), [0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4](https://etherscan.io/address/0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4#code) (Admin) The main entry point to deposit funds from host chain to this chain. It also allows to prove and finalize withdrawals. * Roles: * **admin**: ProxyAdmin; ultimately Conduit Multisig 1 * **balance_claimer**: BalanceClaimer * **guardian**: PgnMultisig Can be upgraded by: Conduit Multisig 1 with no delay #### L1CrossDomainMessenger Addresses: [0x97BAf688E5d0465E149d1d5B497Ca99392a6760e](https://etherscan.io/address/0x97BAf688E5d0465E149d1d5B497Ca99392a6760e#code), [0x1d8180D739D01dC97e837478af8d494215C5EF5e](https://etherscan.io/address/0x1d8180D739D01dC97e837478af8d494215C5EF5e#code) (Implementation (Upgradable)), [0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4](https://etherscan.io/address/0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4#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 Conduit Multisig 1 Can be upgraded by: Conduit Multisig 1 with no delay #### L1StandardBridge Addresses: [0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b](https://etherscan.io/address/0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b#code), [0xF5328094aE48F975CF588f361DDCC749F706aAF0](https://etherscan.io/address/0xF5328094aE48F975CF588f361DDCC749F706aAF0#code) (Implementation (Upgradable)), [0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4](https://etherscan.io/address/0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4#code) (Admin) The main entry point to deposit ERC20 tokens from host chain to this chain. * Roles: * **admin**: ProxyAdmin; ultimately Conduit Multisig 1 * **balance_claimer**: BalanceClaimer Can be upgraded by: Conduit Multisig 1 with no delay #### ProxyAdmin Addresses: [0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4](https://etherscan.io/address/0xc6A8d2c5d0F068BE745f6A770378F01ca1714cc4#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).