From 89ca8ada12616a36603777e22450ddc4534dba91 Mon Sep 17 00:00:00 2001 From: geoknee Date: Fri, 5 Apr 2024 12:45:05 +0100 Subject: [PATCH 01/29] add skeleton structure for revenue sharing spec --- specs/SUMMARY.md | 1 + specs/protocol/predeploys.md | 10 ++++++++++ specs/protocol/revenue-sharing.md | 1 + specs/root.md | 1 + 4 files changed, 13 insertions(+) create mode 100644 specs/protocol/revenue-sharing.md diff --git a/specs/SUMMARY.md b/specs/SUMMARY.md index 6e96eeea4..17c9ef86c 100644 --- a/specs/SUMMARY.md +++ b/specs/SUMMARY.md @@ -20,6 +20,7 @@ - [Batch Submitter](./protocol/batcher.md) - [Predeploys](./protocol/predeploys.md) - [Preinstalls](./protocol/preinstalls.md) + - [Revenue Sharing](./protocol/revenue-sharing.md) - [Superchain]() - [Superchain Configuration](./protocol/superchain-configuration.md) - [Superchain Upgrades](./protocol/superchain-upgrades.md) diff --git a/specs/protocol/predeploys.md b/specs/protocol/predeploys.md index da83b5349..d5f06474a 100644 --- a/specs/protocol/predeploys.md +++ b/specs/protocol/predeploys.md @@ -344,3 +344,13 @@ protocol. Address: `0x4200000000000000000000000000000000000021` The `EAS` predeploy implements the `Ethereum Attestation Service` protocol. + +## RevenueSharer +[Implementation](https://github.com/ethereum-optimism/optimism/blob/6e12d4b630cc1d3dbhttps://github.com/ethereum-optimism/optimism/blob/gk/revenue-sharing/packages/contracts-bedrock/src/L2/RevenueSharer.sol) + + +Address: `0x4200000000000000000000000000000000000022` + +The `RevenueSharer` predepoly implements Revenue Sharing, disbursing funds from FeeVault contracts to the Optimism Collective. \ No newline at end of file diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md new file mode 100644 index 000000000..257aa64b6 --- /dev/null +++ b/specs/protocol/revenue-sharing.md @@ -0,0 +1 @@ +# Revenue Sharing diff --git a/specs/root.md b/specs/root.md index feaa475cf..286f6818c 100644 --- a/specs/root.md +++ b/specs/root.md @@ -32,6 +32,7 @@ that maintains 1:1 compatibility with Ethereum. - [Bridges](protocol/bridges.md) - [Predeploys](protocol/predeploys.md) - [Preinstalls](protocol/preinstalls.md) +- [Revenue Sharing](protocol/revenue-sharing.md) - [Glossary](glossary.md) ### Experimental From cbb3174e52d7c904577afafdbb9583a5c2f16b23 Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 8 Apr 2024 12:54:47 +0100 Subject: [PATCH 02/29] fill out symbols, names and definitions of some quantitites --- specs/protocol/revenue-sharing.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 257aa64b6..d9dfd9383 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -1 +1,14 @@ # Revenue Sharing + +Revenue sharing is the process by which chains in the superchain contribute a portion of their revenue or profit to the Optimism collective. They do this in return for support with the OP Stack and other benefits. + + +## Definitions +| Term | Name | Definition | +| -------|--------------| ----------- | +| $d$ | L1 Data Fee Revenue | ETH transferred to the sequencer with L2 transactions to cover estimated L1 Data Fees(see below). Accumulates to `L1FeeVault`. +| $e$ | L1 Data Fee Expenditure| ETH spent by the batcher on L1 to make transaction data available +| $g$ | L2 Gas Revenue | ETH transferred to the sequencer to cover execution of L2 transactions. Accumulates to `SequencerFeeVault` and `BaseFeeVault`. +| $r$ | Sequencer Revenue | $e + g$ +| $p$ | Sequencer Profit | $e + g - d$ +| $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ \ No newline at end of file From 6bef64c21e161dac1d4cd3b77e1be8e1dd5af1d1 Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 8 Apr 2024 13:30:45 +0100 Subject: [PATCH 03/29] explain simplification of e=0 --- specs/protocol/revenue-sharing.md | 39 +++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index d9dfd9383..3fe8ef504 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -8,7 +8,42 @@ Revenue sharing is the process by which chains in the superchain contribute a po | -------|--------------| ----------- | | $d$ | L1 Data Fee Revenue | ETH transferred to the sequencer with L2 transactions to cover estimated L1 Data Fees(see below). Accumulates to `L1FeeVault`. | $e$ | L1 Data Fee Expenditure| ETH spent by the batcher on L1 to make transaction data available -| $g$ | L2 Gas Revenue | ETH transferred to the sequencer to cover execution of L2 transactions. Accumulates to `SequencerFeeVault` and `BaseFeeVault`. +| $b$ | L2 Base Gas Revenue | Base fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `BaseFeeVault`. +| $p$ | L2 Priority Gas Revenue | Priority fee portion of L2 Gas Fee (ETh transferred to the sequencer to cover execution of L2 transactions). Accumulates to `SequencerFeeVault`. +| $g$ | L2 Gas Revenue | $b+p$ | $r$ | Sequencer Revenue | $e + g$ | $p$ | Sequencer Profit | $e + g - d$ -| $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ \ No newline at end of file +| $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ + +## `RevenueSharer` predeploy +Revenue sharing is achieved through an L2 contract `RevenueSharer`. This is the implementation of a proxy contract `RevenueSharerProxy` with address + +``` +0x4200000000000000000000000000000000000022 +``` + +### Deploying `RevenueSharer` +TODO + +### Execution +Revenue sharing is executed periodically. +The `RevenueSharer` is respomsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer(Proxy)` should be completely depleted of ETH. This allows the contract to be stateless. + +```mermaid + flowchart TD + SequencerFeeVault + BaseFeeVault + L1FeeVault + OptimismCollectiveWallet + RemainderWallet + RevenueSharer + SequencerFeeVault-->|p|RevenueSharer + L1FeeVault-->|d|RevenueSharer + BaseFeeVault-->|b|RevenueSharer + RevenueSharer-->|s|OptimismCollectiveWallet + RevenueSharer-->|p+d+b-s|RemainderWallet +``` + +# Simplified L1 Data Fee Expenditure +As a part of a gradual rollout of protocol enshrined revenue sharing, the `RevenueSharer` uses a fixed value of $e=0$. If $e>d$, the sequence is making a loss on providing data availability. If $d>e$, they are making a profit. By assuming $e=0$, the simplification implies that data availability revenue is all profit. This will be addressed in a future protocol upgrade. + From 511bccb09630bce2bc58ed3b91705cd16351830d Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 8 Apr 2024 13:54:02 +0100 Subject: [PATCH 04/29] wip --- specs/protocol/revenue-sharing.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 3fe8ef504..86e4d7b06 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -41,9 +41,8 @@ The `RevenueSharer` is respomsible for computing $s$ and sending it to a predete L1FeeVault-->|d|RevenueSharer BaseFeeVault-->|b|RevenueSharer RevenueSharer-->|s|OptimismCollectiveWallet - RevenueSharer-->|p+d+b-s|RemainderWallet + RevenueSharer-->|r-s|RemainderWallet ``` - -# Simplified L1 Data Fee Expenditure +## Simplified L1 Data Fee Expenditure As a part of a gradual rollout of protocol enshrined revenue sharing, the `RevenueSharer` uses a fixed value of $e=0$. If $e>d$, the sequence is making a loss on providing data availability. If $d>e$, they are making a profit. By assuming $e=0$, the simplification implies that data availability revenue is all profit. This will be addressed in a future protocol upgrade. From 36529c61bb0e828904706c3eb069a9dac88ef745 Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 8 Apr 2024 13:55:37 +0100 Subject: [PATCH 05/29] tweak --- specs/protocol/revenue-sharing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 86e4d7b06..b79b332e6 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -44,5 +44,5 @@ The `RevenueSharer` is respomsible for computing $s$ and sending it to a predete RevenueSharer-->|r-s|RemainderWallet ``` ## Simplified L1 Data Fee Expenditure -As a part of a gradual rollout of protocol enshrined revenue sharing, the `RevenueSharer` uses a fixed value of $e=0$. If $e>d$, the sequence is making a loss on providing data availability. If $d>e$, they are making a profit. By assuming $e=0$, the simplification implies that data availability revenue is all profit. This will be addressed in a future protocol upgrade. +As a part of a gradual rollout of protocol enshrined revenue sharing, the `RevenueSharer` uses a fixed value of $e=0$. The sequencer makes a profit on data availability of $d-e$. Note that a negative profit, i.e. a loss, is possible. By assuming $e=0$, the simplification implies that data availability revenue is all profit. This will be addressed in a future protocol upgrade. From 10663a5bd152bb88c2576a10db0e76e189b9f637 Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 8 Apr 2024 22:02:27 +0100 Subject: [PATCH 06/29] update twin approach to deployment --- specs/protocol/revenue-sharing.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index b79b332e6..fdb4383bc 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -23,7 +23,12 @@ Revenue sharing is achieved through an L2 contract `RevenueSharer`. This is the ``` ### Deploying `RevenueSharer` -TODO + +#### Existing Chains +Deployed manually using create2 so there is a consistent address across chains. It won't be in the `0x42...` namespace. That is not possible without a hardfork. + +#### Chains after version X.Y.Z of OP Stack +Part of the genesis creation for new chains. ### Execution Revenue sharing is executed periodically. From 846a7d0e37ccdb6764a7d19368985639f412869e Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 9 Apr 2024 09:47:49 +0100 Subject: [PATCH 07/29] fix hyperlink --- specs/protocol/predeploys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/protocol/predeploys.md b/specs/protocol/predeploys.md index d5f06474a..476e4c437 100644 --- a/specs/protocol/predeploys.md +++ b/specs/protocol/predeploys.md @@ -346,7 +346,7 @@ Address: `0x4200000000000000000000000000000000000021` The `EAS` predeploy implements the `Ethereum Attestation Service` protocol. ## RevenueSharer -[Implementation](https://github.com/ethereum-optimism/optimism/blob/6e12d4b630cc1d3dbhttps://github.com/ethereum-optimism/optimism/blob/gk/revenue-sharing/packages/contracts-bedrock/src/L2/RevenueSharer.sol) +[Implementation](https://github.com/ethereum-optimism/optimism/blob/gk/revenue-sharing/packages/contracts-bedrock/src/L2/RevenueSharer.sol) From 1abccaa3a8891e4f878365c10b3429e982c0dcce Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 9 Apr 2024 09:53:21 +0100 Subject: [PATCH 08/29] change RevenueSharer predeploy address and add to table --- specs/protocol/predeploys.md | 3 ++- specs/protocol/revenue-sharing.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/specs/protocol/predeploys.md b/specs/protocol/predeploys.md index 476e4c437..6b80c2ef6 100644 --- a/specs/protocol/predeploys.md +++ b/specs/protocol/predeploys.md @@ -69,6 +69,7 @@ or `Bedrock` or `Canyon`. Deprecated contracts should not be used. | L1FeeVault | 0x420000000000000000000000000000000000001a | Bedrock | No | Yes | | SchemaRegistry | 0x4200000000000000000000000000000000000020 | Bedrock | No | Yes | | EAS | 0x4200000000000000000000000000000000000021 | Bedrock | No | Yes | +| RevenueSharer | 0x4200000000000000000000000000000000000024 | TBC | No | Yes | ## LegacyMessagePasser @@ -351,6 +352,6 @@ The `EAS` predeploy implements the `Ethereum Attestation Service` protocol. TODO: update above link when implementation is merged --> -Address: `0x4200000000000000000000000000000000000022` +Address: `0x4200000000000000000000000000000000000024` The `RevenueSharer` predepoly implements Revenue Sharing, disbursing funds from FeeVault contracts to the Optimism Collective. \ No newline at end of file diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index fdb4383bc..beef43ea3 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -19,7 +19,7 @@ Revenue sharing is the process by which chains in the superchain contribute a po Revenue sharing is achieved through an L2 contract `RevenueSharer`. This is the implementation of a proxy contract `RevenueSharerProxy` with address ``` -0x4200000000000000000000000000000000000022 +0x4200000000000000000000000000000000000024 ``` ### Deploying `RevenueSharer` From bf699ff9b662ed6461f293d78063fa5b65ae9a6c Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 9 Apr 2024 11:34:46 +0100 Subject: [PATCH 09/29] remove -Proxy suffixes --- specs/protocol/predeploys.md | 1 + specs/protocol/revenue-sharing.md | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/specs/protocol/predeploys.md b/specs/protocol/predeploys.md index 6b80c2ef6..070c5e4d8 100644 --- a/specs/protocol/predeploys.md +++ b/specs/protocol/predeploys.md @@ -23,6 +23,7 @@ - [L1FeeVault](#l1feevault) - [SchemaRegistry](#schemaregistry) - [EAS](#eas) +- [RevenueSharer](#revenuesharer) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index beef43ea3..c5dada670 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -1,3 +1,18 @@ + + +**Table of Contents** + +- [Revenue Sharing](#revenue-sharing) + - [Definitions](#definitions) + - [`RevenueSharer` predeploy](#revenuesharer-predeploy) + - [Deploying `RevenueSharer`](#deploying-revenuesharer) + - [Existing Chains](#existing-chains) + - [Chains after version X.Y.Z of OP Stack](#chains-after-version-xyz-of-op-stack) + - [Execution](#execution) + - [Simplified L1 Data Fee Expenditure](#simplified-l1-data-fee-expenditure) + + + # Revenue Sharing Revenue sharing is the process by which chains in the superchain contribute a portion of their revenue or profit to the Optimism collective. They do this in return for support with the OP Stack and other benefits. @@ -16,7 +31,7 @@ Revenue sharing is the process by which chains in the superchain contribute a po | $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ ## `RevenueSharer` predeploy -Revenue sharing is achieved through an L2 contract `RevenueSharer`. This is the implementation of a proxy contract `RevenueSharerProxy` with address +Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract `RevenueSharer` with address ``` 0x4200000000000000000000000000000000000024 @@ -32,7 +47,7 @@ Part of the genesis creation for new chains. ### Execution Revenue sharing is executed periodically. -The `RevenueSharer` is respomsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer(Proxy)` should be completely depleted of ETH. This allows the contract to be stateless. +The `RevenueSharer` is respomsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer` should be completely depleted of ETH. This allows the contract to be stateless. ```mermaid flowchart TD From 03a74ce4d123be2b90d3ff93f49952ea655c355f Mon Sep 17 00:00:00 2001 From: "George C. Knee" Date: Wed, 10 Apr 2024 16:08:55 +0100 Subject: [PATCH 10/29] Apply suggestions from code review Co-authored-by: Blaine Malone --- specs/protocol/revenue-sharing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index c5dada670..16a7c44b9 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -24,7 +24,7 @@ Revenue sharing is the process by which chains in the superchain contribute a po | $d$ | L1 Data Fee Revenue | ETH transferred to the sequencer with L2 transactions to cover estimated L1 Data Fees(see below). Accumulates to `L1FeeVault`. | $e$ | L1 Data Fee Expenditure| ETH spent by the batcher on L1 to make transaction data available | $b$ | L2 Base Gas Revenue | Base fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `BaseFeeVault`. -| $p$ | L2 Priority Gas Revenue | Priority fee portion of L2 Gas Fee (ETh transferred to the sequencer to cover execution of L2 transactions). Accumulates to `SequencerFeeVault`. +| $p$ | L2 Priority Gas Revenue | Priority fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `SequencerFeeVault`. | $g$ | L2 Gas Revenue | $b+p$ | $r$ | Sequencer Revenue | $e + g$ | $p$ | Sequencer Profit | $e + g - d$ @@ -47,7 +47,7 @@ Part of the genesis creation for new chains. ### Execution Revenue sharing is executed periodically. -The `RevenueSharer` is respomsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer` should be completely depleted of ETH. This allows the contract to be stateless. +The `RevenueSharer` is responsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer` should be completely depleted of ETH. This allows the contract to be stateless. ```mermaid flowchart TD From 44406ff05981abdf3dc2feb7c0a44edac280f01c Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 9 Apr 2024 11:54:49 +0100 Subject: [PATCH 11/29] remove statement about existing chains --- specs/protocol/revenue-sharing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 16a7c44b9..8a64ab519 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -40,7 +40,7 @@ Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract ### Deploying `RevenueSharer` #### Existing Chains -Deployed manually using create2 so there is a consistent address across chains. It won't be in the `0x42...` namespace. That is not possible without a hardfork. + #### Chains after version X.Y.Z of OP Stack Part of the genesis creation for new chains. From a33d9f0129d3dc86a189014095fd63dcbe96fd5d Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 9 Apr 2024 12:01:50 +0100 Subject: [PATCH 12/29] add note about upgrading feevault contracts --- specs/protocol/revenue-sharing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 8a64ab519..ed0653977 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -39,12 +39,18 @@ Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract ### Deploying `RevenueSharer` + + #### Existing Chains #### Chains after version X.Y.Z of OP Stack Part of the genesis creation for new chains. +### Reconfiguring existing predeploys +The three `FeeVault` contracts need to be upgraded so that their immutable `RECIPIENT` variable points at the `RevenueSharer`. + + ### Execution Revenue sharing is executed periodically. The `RevenueSharer` is responsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer` should be completely depleted of ETH. This allows the contract to be stateless. From e66e20c99ef4cf5997ec087f5c2a6a31c3d5d63a Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 9 Apr 2024 12:09:27 +0100 Subject: [PATCH 13/29] fix note on deployment --- specs/protocol/revenue-sharing.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index ed0653977..5c2151261 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -40,16 +40,22 @@ Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract ### Deploying `RevenueSharer` - #### Existing Chains - +The `RevenueSharer` can be deployed manually to an arbitrary address, and the existing `Proxy` at `0x4200000000000000000000000000000000000024` can have its implementation set by calling `upgrade` on the `ProxyAdmin`. #### Chains after version X.Y.Z of OP Stack -Part of the genesis creation for new chains. +The `RevenueSharer` can be made a part of the genesis creation for new chains. ### Reconfiguring existing predeploys The three `FeeVault` contracts need to be upgraded so that their immutable `RECIPIENT` variable points at the `RevenueSharer`. +#### Existing Chains +Appropriate transactions can be bundled with the deployment itself. + +#### Chains after version X.Y.Z of OP Stack +Appropriate changes to the genesis will be made. + + ### Execution Revenue sharing is executed periodically. From 05c8c5057a678bca22966c654ec81baf5d6aaa7e Mon Sep 17 00:00:00 2001 From: geoknee Date: Wed, 10 Apr 2024 16:13:53 +0100 Subject: [PATCH 14/29] fix expressions --- specs/protocol/revenue-sharing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 5c2151261..604e4cdf3 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -26,8 +26,8 @@ Revenue sharing is the process by which chains in the superchain contribute a po | $b$ | L2 Base Gas Revenue | Base fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `BaseFeeVault`. | $p$ | L2 Priority Gas Revenue | Priority fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `SequencerFeeVault`. | $g$ | L2 Gas Revenue | $b+p$ -| $r$ | Sequencer Revenue | $e + g$ -| $p$ | Sequencer Profit | $e + g - d$ +| $r$ | Sequencer Revenue | $d + g$ +| $p$ | Sequencer Profit | $d + g - e$ | $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ ## `RevenueSharer` predeploy From 8aa907b7569871b8d9bf8e5d76039f783c23f779 Mon Sep 17 00:00:00 2001 From: geoknee Date: Wed, 10 Apr 2024 16:18:22 +0100 Subject: [PATCH 15/29] Revert "remove proposed qualifier for ecotone upgrade" This reverts commit dc1d1b2aaad8ba4d05dc31cfffdb6ad10a2f5608. --- specs/protocol/superchain-upgrades.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/protocol/superchain-upgrades.md b/specs/protocol/superchain-upgrades.md index 9b05845c8..c28f55f72 100644 --- a/specs/protocol/superchain-upgrades.md +++ b/specs/protocol/superchain-upgrades.md @@ -257,7 +257,8 @@ but the matching L1-origin information may not be present at the time of activat [Governance Proposal](https://gov.optimism.io/t/final-upgrade-proposal-2-canyon-network-upgrade/7088). - `v5.0.0`: 2024 Feb 22nd - Delta network upgrade (Span Batches). [Governance Proposal](https://gov.optimism.io/t/final-upgrade-proposal-3-delta-network-upgrade/7310). -- `v6.0.0`: 2024 Mar 14th - Ecotone network upgrade (4844 Blob Batches + Cancun). +- `v6.0.0`: 2024 Mar 14th - _Proposed_ Ecotone network upgrade (4844 Blob Batches + Cancun). + Still under review by governance. [Governance Proposal](https://gov.optimism.io/t/upgrade-proposal-5-ecotone-network-upgrade/7669). ## Post-Bedrock Network upgrades From 8fe7d9ea8dda12b965334f9de2f1d31685f48dc9 Mon Sep 17 00:00:00 2001 From: geoknee Date: Wed, 10 Apr 2024 16:21:17 +0100 Subject: [PATCH 16/29] harmonize file structure --- specs/protocol/revenue-sharing.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 604e4cdf3..ef46fc56f 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -1,19 +1,23 @@ +# Revenue Sharing **Table of Contents** -- [Revenue Sharing](#revenue-sharing) +- [Overview](#overview) - [Definitions](#definitions) - [`RevenueSharer` predeploy](#revenuesharer-predeploy) - [Deploying `RevenueSharer`](#deploying-revenuesharer) - [Existing Chains](#existing-chains) - [Chains after version X.Y.Z of OP Stack](#chains-after-version-xyz-of-op-stack) + - [Reconfiguring existing predeploys](#reconfiguring-existing-predeploys) + - [Existing Chains](#existing-chains-1) + - [Chains after version X.Y.Z of OP Stack](#chains-after-version-xyz-of-op-stack-1) - [Execution](#execution) - [Simplified L1 Data Fee Expenditure](#simplified-l1-data-fee-expenditure) -# Revenue Sharing +# Overview Revenue sharing is the process by which chains in the superchain contribute a portion of their revenue or profit to the Optimism collective. They do this in return for support with the OP Stack and other benefits. From 826e69123236f57433e94f195c24d55db434d673 Mon Sep 17 00:00:00 2001 From: geoknee Date: Wed, 10 Apr 2024 16:22:48 +0100 Subject: [PATCH 17/29] change OptimismCollective to Beneficiary --- specs/protocol/revenue-sharing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index ef46fc56f..c2b8f9e78 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -19,7 +19,7 @@ # Overview -Revenue sharing is the process by which chains in the superchain contribute a portion of their revenue or profit to the Optimism collective. They do this in return for support with the OP Stack and other benefits. +Revenue sharing is the process by which chains in the superchain contribute a portion of their revenue or profit to a beneficiary such as the Optimism collective. They may do this in return for support with the OP Stack and/or other benefits. ## Definitions @@ -70,13 +70,13 @@ The `RevenueSharer` is responsible for computing $s$ and sending it to a predete SequencerFeeVault BaseFeeVault L1FeeVault - OptimismCollectiveWallet + BeneficiaryWallet RemainderWallet RevenueSharer SequencerFeeVault-->|p|RevenueSharer L1FeeVault-->|d|RevenueSharer BaseFeeVault-->|b|RevenueSharer - RevenueSharer-->|s|OptimismCollectiveWallet + RevenueSharer-->|s|BeneficiaryWallet RevenueSharer-->|r-s|RemainderWallet ``` ## Simplified L1 Data Fee Expenditure From b135699dffa04dd7c08883965a6bb9de8ad3304e Mon Sep 17 00:00:00 2001 From: geoknee Date: Thu, 11 Apr 2024 14:35:37 +0100 Subject: [PATCH 18/29] tweak section on fee vaults --- specs/protocol/exec-engine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/protocol/exec-engine.md b/specs/protocol/exec-engine.md index e9d92f14e..da2c021ab 100644 --- a/specs/protocol/exec-engine.md +++ b/specs/protocol/exec-engine.md @@ -81,7 +81,7 @@ The three types of fees are collected in 3 distinct L2 fee-vault deployments for fee payments are not registered as internal EVM calls, and thus distinguished better this way. These are hardcoded addresses, pointing at pre-deployed proxy contracts. -The proxies are backed by vault contract deployments, based on `FeeVault`, to route vault funds to L1 securely. +The proxies are backed by vault contract deployments, based on `FeeVault`. Funds are moved on from these vaults according to [Revenue Sharing](./revenue-sharing.md). | Vault Name | Predeploy | | ------------------- | ------------------------------------------------------ | From 91ac53d4464afe909a6fcf0551b5541e2130a81b Mon Sep 17 00:00:00 2001 From: geoknee Date: Thu, 11 Apr 2024 14:48:10 +0100 Subject: [PATCH 19/29] Update instructions for deploying RevenueSharer to existing chains --- specs/protocol/revenue-sharing.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index c2b8f9e78..ac383e3db 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -45,7 +45,15 @@ Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract #### Existing Chains -The `RevenueSharer` can be deployed manually to an arbitrary address, and the existing `Proxy` at `0x4200000000000000000000000000000000000024` can have its implementation set by calling `upgrade` on the `ProxyAdmin`. +The following transactions need to be executed: +1. The `RevenueSharer` should be deployed manually to an arbitrary address `REVENUE_SHARER_IMPLEMENTATION_ADDRESS` +3. For EACH of the three FeeVault contracts, + + a. a new version should be deployed with the immutable value `RECIPIENT` set to `0x4200000000000000000000000000000000000024` in the constructor, and other constructor parameters set to existing values. + b. The ProxyAdminOwner should call `ProxyAdmin.upgrade(BASE_FEE_VAULT, NEW_BASE_FEE_VAULT_ADDRESS)` + + + #### Chains after version X.Y.Z of OP Stack The `RevenueSharer` can be made a part of the genesis creation for new chains. From d45794f2a1673edb863aa56695144cb1eba2ec5b Mon Sep 17 00:00:00 2001 From: geoknee Date: Thu, 11 Apr 2024 14:51:11 +0100 Subject: [PATCH 20/29] fix --- specs/protocol/revenue-sharing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index ac383e3db..15140319e 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -47,10 +47,10 @@ Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract #### Existing Chains The following transactions need to be executed: 1. The `RevenueSharer` should be deployed manually to an arbitrary address `REVENUE_SHARER_IMPLEMENTATION_ADDRESS` -3. For EACH of the three FeeVault contracts, +2. For EACH of the three FeeVault contracts ({name} = BASE,L1, SEQUENCER): - a. a new version should be deployed with the immutable value `RECIPIENT` set to `0x4200000000000000000000000000000000000024` in the constructor, and other constructor parameters set to existing values. - b. The ProxyAdminOwner should call `ProxyAdmin.upgrade(BASE_FEE_VAULT, NEW_BASE_FEE_VAULT_ADDRESS)` + a. A new version should be deployed with the immutable value `RECIPIENT` set to `0x4200000000000000000000000000000000000024` in the constructor, and other constructor parameters set to existing values. This contract has an arbitrary address NEW_{name}_FEE_VAULT_ADDRESS. + b. The ProxyAdminOwner should call `ProxyAdmin.upgrade({name}_FEE_VAULT, NEW_{name}_FEE_VAULT_ADDRESS)` From 60c3e7bbe1eae30cec8a9c01d816b7c1c84cc38f Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 15 Apr 2024 10:29:18 +0100 Subject: [PATCH 21/29] update link to RevenueSharer implementation this is broken currently but was only pointing at a WIP. Now when we merge the actual implementation the link should work (up to renaming the file etc). --- specs/protocol/predeploys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/protocol/predeploys.md b/specs/protocol/predeploys.md index 070c5e4d8..9c76162e5 100644 --- a/specs/protocol/predeploys.md +++ b/specs/protocol/predeploys.md @@ -348,7 +348,7 @@ Address: `0x4200000000000000000000000000000000000021` The `EAS` predeploy implements the `Ethereum Attestation Service` protocol. ## RevenueSharer -[Implementation](https://github.com/ethereum-optimism/optimism/blob/gk/revenue-sharing/packages/contracts-bedrock/src/L2/RevenueSharer.sol) +[Implementation](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/RevenueSharer.sol) From 2248b74376d22336ff1e154c9d51546738f58344 Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 15 Apr 2024 10:55:19 +0100 Subject: [PATCH 22/29] rename variable --- specs/protocol/revenue-sharing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 15140319e..6506eeb77 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -28,10 +28,10 @@ Revenue sharing is the process by which chains in the superchain contribute a po | $d$ | L1 Data Fee Revenue | ETH transferred to the sequencer with L2 transactions to cover estimated L1 Data Fees(see below). Accumulates to `L1FeeVault`. | $e$ | L1 Data Fee Expenditure| ETH spent by the batcher on L1 to make transaction data available | $b$ | L2 Base Gas Revenue | Base fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `BaseFeeVault`. -| $p$ | L2 Priority Gas Revenue | Priority fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `SequencerFeeVault`. -| $g$ | L2 Gas Revenue | $b+p$ -| $r$ | Sequencer Revenue | $d + g$ -| $p$ | Sequencer Profit | $d + g - e$ +| $q$ | L2 Priority Gas Revenue | Priority fee portion of L2 Gas Fee (ETH transferred to the sequencer to cover execution of L2 transactions). Accumulates to `SequencerFeeVault`. +| $g$ | L2 Gas Revenue | $b + q$ +| $r$ | Sequencer Revenue | $d + b + q$ +| $p$ | Sequencer Profit | $r - e$ | $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ ## `RevenueSharer` predeploy @@ -81,7 +81,7 @@ The `RevenueSharer` is responsible for computing $s$ and sending it to a predete BeneficiaryWallet RemainderWallet RevenueSharer - SequencerFeeVault-->|p|RevenueSharer + SequencerFeeVault-->|q|RevenueSharer L1FeeVault-->|d|RevenueSharer BaseFeeVault-->|b|RevenueSharer RevenueSharer-->|s|BeneficiaryWallet From 1c54fc3fae289036c2951e2cbaffcccbe37e6df0 Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 16 Apr 2024 10:34:44 +0100 Subject: [PATCH 23/29] don't specify immutable --- specs/protocol/revenue-sharing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 6506eeb77..4090d92f3 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -47,9 +47,9 @@ Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract #### Existing Chains The following transactions need to be executed: 1. The `RevenueSharer` should be deployed manually to an arbitrary address `REVENUE_SHARER_IMPLEMENTATION_ADDRESS` -2. For EACH of the three FeeVault contracts ({name} = BASE,L1, SEQUENCER): +2. For EACH of the three FeeVault contracts ({name} = BASE, L1, SEQUENCER): - a. A new version should be deployed with the immutable value `RECIPIENT` set to `0x4200000000000000000000000000000000000024` in the constructor, and other constructor parameters set to existing values. This contract has an arbitrary address NEW_{name}_FEE_VAULT_ADDRESS. + a. A new version should be deployed with the `RECIPIENT` variable set to `0x4200000000000000000000000000000000000024` in the constructor, and other constructor parameters set to existing values. This contract has an arbitrary address `NEW_{name}_FEE_VAULT_ADDRESS`. b. The ProxyAdminOwner should call `ProxyAdmin.upgrade({name}_FEE_VAULT, NEW_{name}_FEE_VAULT_ADDRESS)` From 91ab308692f440af6fef6ff3f7e058a8eb406d33 Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 16 Apr 2024 10:39:55 +0100 Subject: [PATCH 24/29] remove section about deploying to new chains --- specs/protocol/revenue-sharing.md | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 4090d92f3..48da4c0eb 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -35,40 +35,21 @@ Revenue sharing is the process by which chains in the superchain contribute a po | $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ ## `RevenueSharer` predeploy -Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract `RevenueSharer` with address - -``` -0x4200000000000000000000000000000000000024 -``` +Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract `RevenueSharer` with address `0x4200000000000000000000000000000000000024`. ### Deploying `RevenueSharer` +The `RevenueSharer` contract is now included in the L2 genesis and is not scheduled to be part of a hardfork. #### Existing Chains -The following transactions need to be executed: +For chains without the `RevenueSharer` in their genesis, the following transactions may be executed to deploy it +: 1. The `RevenueSharer` should be deployed manually to an arbitrary address `REVENUE_SHARER_IMPLEMENTATION_ADDRESS` 2. For EACH of the three FeeVault contracts ({name} = BASE, L1, SEQUENCER): a. A new version should be deployed with the `RECIPIENT` variable set to `0x4200000000000000000000000000000000000024` in the constructor, and other constructor parameters set to existing values. This contract has an arbitrary address `NEW_{name}_FEE_VAULT_ADDRESS`. b. The ProxyAdminOwner should call `ProxyAdmin.upgrade({name}_FEE_VAULT, NEW_{name}_FEE_VAULT_ADDRESS)` - - - -#### Chains after version X.Y.Z of OP Stack -The `RevenueSharer` can be made a part of the genesis creation for new chains. - -### Reconfiguring existing predeploys -The three `FeeVault` contracts need to be upgraded so that their immutable `RECIPIENT` variable points at the `RevenueSharer`. - -#### Existing Chains -Appropriate transactions can be bundled with the deployment itself. - -#### Chains after version X.Y.Z of OP Stack -Appropriate changes to the genesis will be made. - - - ### Execution Revenue sharing is executed periodically. The `RevenueSharer` is responsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer` should be completely depleted of ETH. This allows the contract to be stateless. From cad87eb2b10046b48056ba9141e1bafaa5353462 Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 16 Apr 2024 10:42:22 +0100 Subject: [PATCH 25/29] specify funds can go to L1 or L2 --- specs/protocol/revenue-sharing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 48da4c0eb..8ff024776 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -51,7 +51,7 @@ For chains without the `RevenueSharer` in their genesis, the following transacti b. The ProxyAdminOwner should call `ProxyAdmin.upgrade({name}_FEE_VAULT, NEW_{name}_FEE_VAULT_ADDRESS)` ### Execution -Revenue sharing is executed periodically. +Revenue sharing is executed periodically, and can be configured to send funds to L1 or to L2. The `RevenueSharer` is responsible for computing $s$ and sending it to a predetermined address controlled by the Optimism Collective. At the end of execution, `SequencerFeeVault`, `L1FeeVault` and `BaseFeeVault` and `RevenueSharer` should be completely depleted of ETH. This allows the contract to be stateless. ```mermaid From ba125ef6312c9990914a97575914e6df4c084973 Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 16 Apr 2024 10:43:36 +0100 Subject: [PATCH 26/29] add definition of execute fn --- specs/protocol/revenue-sharing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 8ff024776..9e43c239e 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -68,6 +68,8 @@ The `RevenueSharer` is responsible for computing $s$ and sending it to a predete RevenueSharer-->|s|BeneficiaryWallet RevenueSharer-->|r-s|RemainderWallet ``` + +The execution of Revenue Sharing is achieved by calling `RevenueSharer.execute()`. ## Simplified L1 Data Fee Expenditure As a part of a gradual rollout of protocol enshrined revenue sharing, the `RevenueSharer` uses a fixed value of $e=0$. The sequencer makes a profit on data availability of $d-e$. Note that a negative profit, i.e. a loss, is possible. By assuming $e=0$, the simplification implies that data availability revenue is all profit. This will be addressed in a future protocol upgrade. From 4bfd92019e6922cd7678d8c6e2a8fdc69a698e23 Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 16 Apr 2024 10:53:57 +0100 Subject: [PATCH 27/29] add section on invariants --- specs/protocol/revenue-sharing.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 9e43c239e..3d86905ce 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -37,6 +37,11 @@ Revenue sharing is the process by which chains in the superchain contribute a po ## `RevenueSharer` predeploy Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract `RevenueSharer` with address `0x4200000000000000000000000000000000000024`. +### Invariants +* The `RevenueSharer` contract should not accumulate any ETH or Tokens itself. +* It should share revenue in the propotions `s, r-s` when the `execute()` function is called +* It should emit an event when `execute()` is called. + ### Deploying `RevenueSharer` The `RevenueSharer` contract is now included in the L2 genesis and is not scheduled to be part of a hardfork. From 86313ad67463b30897142d65bc25d44157e0c9b7 Mon Sep 17 00:00:00 2001 From: geoknee Date: Tue, 16 Apr 2024 10:54:26 +0100 Subject: [PATCH 28/29] lint --- specs/protocol/revenue-sharing.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index 3d86905ce..df2d68f61 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -6,12 +6,9 @@ - [Overview](#overview) - [Definitions](#definitions) - [`RevenueSharer` predeploy](#revenuesharer-predeploy) + - [Invariants](#invariants) - [Deploying `RevenueSharer`](#deploying-revenuesharer) - [Existing Chains](#existing-chains) - - [Chains after version X.Y.Z of OP Stack](#chains-after-version-xyz-of-op-stack) - - [Reconfiguring existing predeploys](#reconfiguring-existing-predeploys) - - [Existing Chains](#existing-chains-1) - - [Chains after version X.Y.Z of OP Stack](#chains-after-version-xyz-of-op-stack-1) - [Execution](#execution) - [Simplified L1 Data Fee Expenditure](#simplified-l1-data-fee-expenditure) From 5f2ab2edbf91f1dd63caf7478b0a31d132db0c8f Mon Sep 17 00:00:00 2001 From: geoknee Date: Mon, 22 Apr 2024 15:10:43 +0100 Subject: [PATCH 29/29] add definitions for BENEFICIARY AND REMAINDER_BENEFICIARY --- specs/protocol/revenue-sharing.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specs/protocol/revenue-sharing.md b/specs/protocol/revenue-sharing.md index df2d68f61..cf1c8553a 100644 --- a/specs/protocol/revenue-sharing.md +++ b/specs/protocol/revenue-sharing.md @@ -29,14 +29,16 @@ Revenue sharing is the process by which chains in the superchain contribute a po | $g$ | L2 Gas Revenue | $b + q$ | $r$ | Sequencer Revenue | $d + b + q$ | $p$ | Sequencer Profit | $r - e$ -| $s$ | Revenue share due to Optimism Collective | $\max(0.15r,0.025p)$ +| $s$ | Revenue share due to `BENEFICIARY`| $\max(0.15r,0.025p)$ +| `BENEFICIARY` | e.g. Optimism Collective | +| `REMAINDER_BENEFICIARY` | e.g. Chain Operator | ## `RevenueSharer` predeploy Revenue sharing is achieved through an L2 [predeploy](./predeploys.md) contract `RevenueSharer` with address `0x4200000000000000000000000000000000000024`. ### Invariants * The `RevenueSharer` contract should not accumulate any ETH or Tokens itself. -* It should share revenue in the propotions `s, r-s` when the `execute()` function is called +* It should share revenue in the propotions `s, r-s` when the `execute()` function is called, to `BENEFICIARY` and `REMAINDER_BENEFICIARY` respectively. * It should emit an event when `execute()` is called. ### Deploying `RevenueSharer` @@ -72,6 +74,7 @@ The `RevenueSharer` is responsible for computing $s$ and sending it to a predete ``` The execution of Revenue Sharing is achieved by calling `RevenueSharer.execute()`. + ## Simplified L1 Data Fee Expenditure As a part of a gradual rollout of protocol enshrined revenue sharing, the `RevenueSharer` uses a fixed value of $e=0$. The sequencer makes a profit on data availability of $d-e$. Note that a negative profit, i.e. a loss, is possible. By assuming $e=0$, the simplification implies that data availability revenue is all profit. This will be addressed in a future protocol upgrade.