From 39630c6cd465187feb363edbc16683f0191b750e Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Wed, 24 Sep 2025 14:40:04 -0300 Subject: [PATCH 1/5] feat: add new diagram --- protocol/fee-splitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/fee-splitter.md b/protocol/fee-splitter.md index ab7e5a9cc..5720de608 100644 --- a/protocol/fee-splitter.md +++ b/protocol/fee-splitter.md @@ -28,7 +28,7 @@ Fixed fee shares are too rigid: chains want custom splits, L1/L2 destinations, a ## Proposed Solution -rev-overview +rev-overview The `FeeSplitter` will be a predeploy with a modular config. The `SharesCalculator` and each `Recipient` are external entities that integrate into the system. From 1dcfb3643a63156e8c132545470a06069b8138f8 Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:29:17 -0300 Subject: [PATCH 2/5] feat: add new comment --- protocol/fee-splitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/fee-splitter.md b/protocol/fee-splitter.md index 5720de608..3db1157e8 100644 --- a/protocol/fee-splitter.md +++ b/protocol/fee-splitter.md @@ -42,7 +42,7 @@ High‑level flow: 3. The `FeeSplitter` calls the chain‑configured `SharesCalculator` with: - The revenue per vault as input to compute disbursements. - Receives data from `SharedCalculator` (amounts and outputs). -4. Finally, the `FeeSplitter` transfers the respective amount to each recipient and emit `FeesDisbursed`. +4. Finally, the `FeeSplitter` transfers the respective amount to each recipient and emit `FeesDisbursed`. One possible subsequent flow is for the `L1Withdrawer` to withdraw to the `FeesDepositor`, which automatically triggers a deposit on the `OptimismPortal` on L1. ```mermaid graph LR From 96bd2cc56fdde2b236a9b6cba5d4a0722744be1b Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:14:53 -0300 Subject: [PATCH 3/5] fix: add one more portal --- protocol/fee-splitter.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol/fee-splitter.md b/protocol/fee-splitter.md index 3db1157e8..d95f7ba89 100644 --- a/protocol/fee-splitter.md +++ b/protocol/fee-splitter.md @@ -28,7 +28,8 @@ Fixed fee shares are too rigid: chains want custom splits, L1/L2 destinations, a ## Proposed Solution -rev-overview +image + The `FeeSplitter` will be a predeploy with a modular config. The `SharesCalculator` and each `Recipient` are external entities that integrate into the system. From 5d3087aa9101e9696c13c3d5f79ccbc8fa9968c4 Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:16:20 -0300 Subject: [PATCH 4/5] chore: remove mermaid --- protocol/fee-splitter.md | 55 ---------------------------------------- 1 file changed, 55 deletions(-) diff --git a/protocol/fee-splitter.md b/protocol/fee-splitter.md index d95f7ba89..dd3760b12 100644 --- a/protocol/fee-splitter.md +++ b/protocol/fee-splitter.md @@ -45,61 +45,6 @@ High‑level flow: - Receives data from `SharedCalculator` (amounts and outputs). 4. Finally, the `FeeSplitter` transfers the respective amount to each recipient and emit `FeesDisbursed`. One possible subsequent flow is for the `L1Withdrawer` to withdraw to the `FeesDepositor`, which automatically triggers a deposit on the `OptimismPortal` on L1. -```mermaid -graph LR - -User((User)) - -%% -------- Vaults row -------- -subgraph Vaults_L2["Fee Vaults"] - direction TB - BaseFeeVault[BFVault] - L1FeeVault[L1FVault] - SequencerFeeVault[SFVault] - OperatorFeeVault[OFVault] -end - -%% -------- Fee Splitter zone -------- -subgraph SplitterZone["Fee Splitter"] - direction LR - FeeSplitterNode[[FeeSplitter]] - SharesCalculator[SharesCalculator] - L2Recipient[EOA Recipient] - L2SC[Contracts] - L1Withdrawer[L1 Withdrawer] - L2ToL1MessagePasser[L2ToL1MP] -end - -%% -------- L1 side -------- -subgraph L1Zone["L1 Contracts"] - direction TB - Prover((User)) - OptimismPortal[OptimismPortal] - L1Recipient[L1 Recipient] -end - -%% -------- Flows -------- -User -->|"(1) disburseFees"| FeeSplitterNode - -BaseFeeVault -->|"(2) withdraw"| FeeSplitterNode -L1FeeVault -->|"(2) withdraw"| FeeSplitterNode -SequencerFeeVault -->|"(2) withdraw"| FeeSplitterNode -OperatorFeeVault -->|"(2) withdraw"| FeeSplitterNode - -FeeSplitterNode -->|"(3) getSharesRecipients"| SharesCalculator -SharesCalculator -.-> FeeSplitterNode - -FeeSplitterNode -->|"(4) send"| L2Recipient -FeeSplitterNode -->|"(4) send"| L2SC -FeeSplitterNode -->|"(4) send"| L1Withdrawer - -L1Withdrawer -->|"initiateWithdrawal"| L2ToL1MessagePasser -L2ToL1MessagePasser -.-> OptimismPortal -Prover -->|"prove and finalize"| OptimismPortal -OptimismPortal -->|"deliver"| L1Recipient - -``` - **Invariants:** - On misconfigured vaults, `disbursementFees()` MUST revert From fcd292a264bf61602e4d34f33edfa7e7452fd3f6 Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:28:53 -0300 Subject: [PATCH 5/5] fix: typo --- protocol/fee-splitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/fee-splitter.md b/protocol/fee-splitter.md index dd3760b12..a43eaea71 100644 --- a/protocol/fee-splitter.md +++ b/protocol/fee-splitter.md @@ -28,7 +28,7 @@ Fixed fee shares are too rigid: chains want custom splits, L1/L2 destinations, a ## Proposed Solution -image +image The `FeeSplitter` will be a predeploy with a modular config. The `SharesCalculator` and each `Recipient` are external entities that integrate into the system.