Skip to content

Commit cae3723

Browse files
committed
docs: clarify FeeVault is optional, document when to use it vs plain baseFeeSink
1 parent c6e679b commit cae3723

3 files changed

Lines changed: 33 additions & 18 deletions

File tree

contracts/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ The AdminProxy contract solves the bootstrap problem for admin addresses at gene
88

99
See [AdminProxy documentation](../docs/contracts/admin_proxy.md) for detailed setup and usage instructions.
1010

11-
## FeeVault
11+
## FeeVault (optional)
1212

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.
1414

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.
1922

2023
## Prerequisites
2124

docs/contracts/fee_vault.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22

33
## Overview
44

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.
616

717
## Use Case
818

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.
1020

1121
1. **Fee Accumulation**: The contract receives funds from:
1222
- **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.

docs/guide/fee-systems.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ These components are independent but commonly deployed together. The base fee re
3131

3232
See `docs/adr/ADR-0001-base-fee-redirect.md` for implementation details.
3333

34-
## FeeVault (contract level)
34+
## FeeVault (contract level, optional)
3535

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.
3739

3840
**Mechanics**:
3941

4042
- Receives base fees when `baseFeeSink` is set to the FeeVault address.
4143
- Anyone can trigger `distribute()` once the minimum threshold is met.
4244
- Splits balance by `bridgeShareBps`, sends the bridge share to `bridgeRecipient`, and transfers the remainder to `otherRecipient`.
4345

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-
4646
See `docs/contracts/fee_vault.md` for parameters and deployment details.
4747

4848
## Native Token Minting Precompile
@@ -69,17 +69,19 @@ See `docs/adr/ADR-0002-native-minting-precompile.md` for the full interface and
6969

7070
## How They Fit Together
7171

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.
7474
3. **Native minting** is separate and optional; it is used for controlled supply changes (bootstrapping liquidity, treasury operations), not for redirecting fees.
7575

7676
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.
7777

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.
7983

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.
8385

8486
References:
8587

0 commit comments

Comments
 (0)