Overview
User balances have a target precision before and after every fill:- Direct member balances are aligned to
$0.0001(0.01c) - Non-direct member balances are aligned to
$0.01(1c)
$0.000001 granularity) — the finest precision a fill’s revenue (price × quantity) can occupy. Every fill produces three fee components:
Net fee = trade fee + rounding fee - rebate (always >= $0.00)
Rounding Mechanics
Given a fill’s signedrevenue (negative for buyers) and model fee:
- Compute
trade_fee = ceil_6dp(model_fee) - Compute
aligned_change = floor_precision(revenue - trade_fee) - Compute
rounding_fee = (revenue - trade_fee) - aligned_change - Add the rounding fee to the order’s accumulator
- Rebate accumulated rounding in increments of the user’s target balance precision, capped so the fill’s net fee cannot be negative
aligned_change, which is always on the user’s precision grid.
Fee Accumulator
The fee accumulator carries rounding overpayment across an order’s fills. Rebates use the user’s target balance precision:$0.0001 for direct members and $0.01 for non-direct members.
The fee accumulator is maintained per order across all fills regardless of whether the fills are taker or maker. If an order initially takes (matching resting orders) and then becomes a resting maker order, the accumulated rounding carries over to subsequent maker fills.
Worked Examples
FCM-cleared fill
FCM-cleared fill
For a non-direct member with The balance changes by
$0.01 balance precision, suppose a buy has -$0.055000 of signed revenue and a model fee of $0.00363825:-$0.06; the trade fee plus rounding fee is exactly $0.005.Accumulator across fills
Accumulator across fills
If three fills each add
$0.004 of rounding overpayment, the accumulator carries it forward. Assuming the third fill has enough total fee to cover a $0.01 rebate:This table uses a non-direct member’s
$0.01 precision. Direct-member rebates follow the same mechanics in $0.0001 increments. In either case, the rebate is capped so that the fill’s net fee cannot become negative.