pub const DUST_SNAP_THRESHOLD: f64 = 0.01;Expand description
Dust band (in shares) for fill quantity normalization. Set to one cent-share, matching Polymarket’s CLOB tick quantization.
Live-fill snapping is overfill-only: when the venue fill exceeds
submitted_qty by less than DUST_SNAP_THRESHOLD, the fill is snapped
DOWN to submitted_qty. Underfill is preserved on the per-fill path and
resolved at terminal MATCHED status by the synthetic dust fill
mechanism. OrderStatusReport.filled_qty snapping at terminal Filled
status uses this same threshold in both directions.
Two observed drift sources sit within this band:
- CLOB cent-tick truncation (underfill, up to
0.01shares). - V2 market-BUY USDC-scale truncation in
adjust_market_buy_amount(overfill, microshares; largest reproduced production overage is0.000066shares).
A diff at or above this threshold is left unsnapped and surfaces to the
engine. See docs/integrations/polymarket.md (Fill quantity normalization).