pub fn quote_to_base(
quote_amount: u128,
tick: i16,
rounding: RoundingDirection,
) -> Option<u128>Expand description
Convert quote token amount to base token amount at a given tick.
Formula: base_amount = (quote_amount * PRICE_SCALE) / price
Uses U256 for intermediate multiplication to prevent overflow.
§Arguments
quote_amount- Amount of quote tokenstick- Price tickrounding- Rounding direction
§Returns
Base token amount, or None if result exceeds u128