Skip to main content

Crate riptide_amm_math

Crate riptide_amm_math 

Source

Structs§

Quote

Enums§

BookSpacingType
OracleData
QuoteType

Constants§

AMOUNT_EXCEEDS_MAX_U32
AMOUNT_EXCEEDS_MAX_U64
AMOUNT_EXCEEDS_MAX_U128
ARITHMETIC_OVERFLOW
INVALID_ORACLE_DATA
PER_M_DENOMINATOR

Functions§

a_to_b
Convert an amount in token A to an amount in token B
amount_to_ui_amount
b_to_a
Convert an amount in token B to an amount in token A
from_q64_64
Convert a Q64.64 price into a floating point price IMPORTANT: floating point operations can reduce the precision of the result. Make sure to do these operations last and not to use the result for further calculations.
inverse_q64_64
Invert a Q64.64 price from A/B to B/A
quote_exact_in
quote_exact_out
to_q64_64
Convert a floating point price into a Q64.64 price IMPORTANT: floating point operations can reduce the precision of the result. Make sure to do these operations last and not to use the result for further calculations.
ui_amount_to_amount

Type Aliases§

CoreError
U128