You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contracts/README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,17 @@ The AdminProxy contract solves the bootstrap problem for admin addresses at gene
8
8
9
9
See [AdminProxy documentation](../docs/contracts/admin_proxy.md) for detailed setup and usage instructions.
10
10
11
-
## FeeVault
11
+
## FeeVault (optional)
12
12
13
-
The FeeVault contract collects base fees and distributes them between a bridge recipient and an optional secondary recipient. It supports:
13
+
The FeeVault is an **optional**contract for chains that need on-chain fee splitting logic. The base fee redirect (`baseFeeSink`) works with any address — an EOA or multisig is sufficient if you just need fees sent to a single destination.
14
14
15
-
- Configurable fee splitting between bridge and another recipient
16
-
- Minimum amount thresholds before distributing
17
-
- Call fee for incentivizing distribution calls
18
-
- Owner-controlled configuration
15
+
FeeVault is useful when you need:
16
+
17
+
-**Automatic splitting** of accumulated fees between two recipients (e.g., 80% to a bridge contract, 20% to a treasury)
18
+
-**Minimum threshold** to avoid distributing uneconomically small amounts
19
+
-**Keeper incentive** (`callFee`) so anyone can trigger distribution and get compensated
20
+
21
+
If your chain only needs fees routed to a single address, skip FeeVault and point `baseFeeSink` directly at that address.
Copy file name to clipboardExpand all lines: docs/contracts/fee_vault.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,21 @@
2
2
3
3
## Overview
4
4
5
-
The `FeeVault` is a specialized smart contract designed to accumulate native tokens (gas tokens) and automatically split them between a bridge recipient and a secondary recipient.
5
+
The `FeeVault` is an **optional** smart contract for chains that need on-chain fee splitting logic. It accumulates native tokens (gas tokens) and automatically splits them between two configurable recipients.
6
+
7
+
## When to Use FeeVault
8
+
9
+
The base fee redirect (`baseFeeSink`) works with any address. You **do not need** FeeVault if fees should go to a single destination — just point `baseFeeSink` at an EOA or multisig.
10
+
11
+
FeeVault adds value when you need:
12
+
13
+
-**Splitting**: Automatically divide fees between two recipients (e.g., 80% to a bridge, 20% to treasury).
14
+
-**Minimum threshold**: Only distribute when enough has accumulated to be economically worthwhile.
15
+
-**Keeper incentive**: A `callFee` rewards anyone who triggers the distribution, removing the need for a centralized operator.
6
16
7
17
## Use Case
8
18
9
-
This contract serves as a **fee sink** and **distribution mechanism** for a rollup or chain that wants to redirect collected fees (e.g., EIP-1559 base fees) to configured recipients while retaining a portion for other purposes (e.g., developer rewards, treasury).
19
+
This contract serves as a **fee sink** and **distribution mechanism** for a rollup or chain that wants to redirect collected fees (e.g., EIP-1559 base fees) to multiple recipients.
10
20
11
21
1.**Fee Accumulation**: The contract receives funds from:
12
22
-**Base Fee Redirect**: The chain's execution layer (e.g., `ev-revm`) can be configured to direct burned base fees directly to this contract's address.
Copy file name to clipboardExpand all lines: docs/guide/fee-systems.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,18 +31,18 @@ These components are independent but commonly deployed together. The base fee re
31
31
32
32
See `docs/adr/ADR-0001-base-fee-redirect.md` for implementation details.
33
33
34
-
## FeeVault (contract level)
34
+
## FeeVault (contract level, optional)
35
35
36
-
**Purpose**: Accumulate native tokens and split them between a bridge recipient and a secondary recipient.
36
+
**Purpose**: Accumulate native tokens and split them between two configurable recipients.
37
+
38
+
FeeVault is **optional**. The base fee redirect works with any address — if fees should go to a single destination, point `baseFeeSink` at an EOA or multisig and skip FeeVault entirely. Use FeeVault when you need automatic on-chain splitting, minimum thresholds, or keeper incentives.
37
39
38
40
**Mechanics**:
39
41
40
42
- Receives base fees when `baseFeeSink` is set to the FeeVault address.
41
43
- Anyone can trigger `distribute()` once the minimum threshold is met.
42
44
- Splits balance by `bridgeShareBps`, sends the bridge share to `bridgeRecipient`, and transfers the remainder to `otherRecipient`.
43
45
44
-
**Why it pairs with base fee redirect**: the redirect funnels base fees into the FeeVault automatically, turning burned fees into recoverable value for treasury or bridging.
45
-
46
46
See `docs/contracts/fee_vault.md` for parameters and deployment details.
47
47
48
48
## Native Token Minting Precompile
@@ -69,17 +69,19 @@ See `docs/adr/ADR-0002-native-minting-precompile.md` for the full interface and
69
69
70
70
## How They Fit Together
71
71
72
-
1.**Base fee redirect** credits base fees to a sink address instead of burning them.
73
-
2.**FeeVault**can be that sink, so base fees accumulate in a contract with deterministic split logic.
72
+
1.**Base fee redirect** credits base fees to a sink address instead of burning them. The sink can be any address (EOA, multisig, or contract).
73
+
2.**FeeVault**is one option for that sink when you need automatic splitting between two recipients. If fees go to a single destination, skip it.
74
74
3.**Native minting** is separate and optional; it is used for controlled supply changes (bootstrapping liquidity, treasury operations), not for redirecting fees.
75
75
76
76
In other words, base fee redirect and FeeVault are about re-routing existing value, while native minting explicitly changes total supply. Keep those responsibilities separate and limit minting access to minimize systemic risk.
77
77
78
-
## Suggested Deployment Pattern
78
+
## Suggested Deployment Patterns
79
+
80
+
**Simple (no FeeVault):** Set `baseFeeSink` to an EOA or multisig. Fees accumulate there directly.
81
+
82
+
**With splitting (FeeVault):** Set `baseFeeSink` to the FeeVault address. Configure the split between `bridgeRecipient` and `otherRecipient`. Use `AdminProxy` as the FeeVault owner if you need a safe, upgradeable admin.
79
83
80
-
- Set `baseFeeSink` to the FeeVault address.
81
-
- Use `AdminProxy` as the `mintAdmin` and FeeVault owner if you need a safe, upgradeable admin.
82
-
- Activate both features at a planned height for existing networks.
84
+
Both patterns can be combined with native minting if needed. Activate features at a planned height for existing networks.
0 commit comments