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

FunctionCallerDescription
collect_fee(token, amount)quote_verifier onlyCalled once per settled trade to record fee
withdraw(token, amount, to)AdminTransfers accumulated fees to treasury address
get_balance(token)AnyoneReturns accumulated fees for a token
get_all_balances()AnyoneReturns fee balances for all tokens

Current fee rate: 10 bps (0.10%) of amount_out

Address: CAAWWYIUWKV2Z4OGAVBXNVRGRCN3QY3FF4M2BLV72V2MBNEVFLMSAU2R

HyperDex | Trade Without Limits