Reporting on Fees
Info
As a RaaS or Chain Owner, if you require internal daily reporting on fees, we have an RPC script you can leverage for reporting purposes.
Fee Collection System Overview
1. Fee Collector Address Types (L1 Focus)
There are two main L1 fee collector addresses:
- L1 Base Fee - Refunds batch poster for parent chain posting costs
- L1 Surplus - Collects profit on batch posting fees
Important Distinction:
- L1 Base Fee = Cost recovery only (NOT for profit)
- L1 Surplus = Profit collection
- Using L1 Base Fee for profit indicates misconfiguration
2. How the System Works (Same Gas Token Scenario)
Transaction Flow:
- Users send transactions on the child chain
- Transactions are packaged into batches
- Batch poster sends batches to parent chain (paying parent chain gas)
- Batch posting reports are generated containing:
- Batch size
- Gas price used
Fee Recovery Mechanism:
- ArbOS consumes batch posting reports
- Creates gas price view of parent chain on child chain
- Uses this view for pricing future transactions
- Implements balancing mechanism to ensure:
- Amount collected in L1 base fee ≈ Amount spent on batch posting
- Uses estimates that average out over time
3. Custom Gas Token Scenario (Different tokens on parent/child chains)
Transaction Flow:
- Users send transactions on the child chain
- Transactions are packaged into batches
- Batch poster sends batches to parent chain (paying parent chain gas)
- Fee token price setter mechanism scales the gas price by the exchange rate
- Batch posting reports are generated containing:
- Batch size
- Gas price used (scaled by the exchange rate)
Fee Recovery Mechanism:
Same as the same gas token scenario, but uses the gas price from the batch posting report that was already scaled by the exchange rate.
The Exchange Rate Problem:
- Batch poster spends in parent chain gas units
- Gets refunded in child chain gas units
- Creates exchange rate risk
- Should NOT set artificially high exchange rate for profit
4. Monitoring Tool Requirements
Purpose:
Detect if operators have misconfigured the L1 base fee mechanism (using it for profit by manipulating exchange rates)