Programs
fee_distributor
The fee_distributor is a simple accounting contract that accumulates protocol fees and provides a controlled withdrawal path to the treasury.
Design rationale
Separating fee collection from pool custody means treasury withdrawal operations never touch maker inventory. An admin action on fee_distributor cannot accidentally affect taker or maker funds held in a maker_pool.
Functions
| Function | Caller | Description |
|---|---|---|
| collect_fee(token, amount) | quote_verifier only | Called once per settled trade to record fee |
| withdraw(token, amount, to) | Admin | Transfers accumulated fees to treasury address |
| get_balance(token) | Anyone | Returns accumulated fees for a token |
| get_all_balances() | Anyone | Returns fee balances for all tokens |
Current fee rate: 10 bps (0.10%) of amount_out
Address: CAAWWYIUWKV2Z4OGAVBXNVRGRCN3QY3FF4M2BLV72V2MBNEVFLMSAU2R