Units & precision
- Amounts and fee values are raw integers. Scale token amounts using
tokens.decimals. sqrt_price_x96is a Q64.96 square-root price. Converting it to a readable ratio also requires both token decimals.- Float conversion loses precision. Keep integers or decimal arithmetic for accounting.
- Maximum fee fields show fee ceilings. Calculate the actual priority fee paid separately.