pub fn compute_maker_taker_amounts(
price: Decimal,
quantity: Decimal,
side: PolymarketOrderSide,
tick_decimals: u32,
) -> (Decimal, Decimal)Expand description
Builds the maker/taker amounts for a Polymarket CLOB limit order.
The CLOB enforces precision constraints on both amounts:
- Direct amounts (quantity passed through): max
LOT_SIZE_SCALE(2) decimal places - Computed amounts (quantity * price): max
tick_decimals + LOT_SIZE_SCALEdecimal places
For BUY: paying pUSD (maker, computed) to receive CTF shares (taker, direct) For SELL: paying CTF shares (maker, direct) to receive pUSD (taker, computed)