Functionsยง
- encode_
sqrt_ ratio_ x96 - Encodes the sqrt ratio of two token amounts as a Q64.96 fixed point number.
- expand_
to_ 18_ decimals - Expands an amount to 18 decimal places (multiplies by 10^18).
- get_
amount0_ delta - Calculates the amount of token0 delta between two sqrt price ratios.
- get_
amount1_ delta - Calculates the amount of token1 delta between two sqrt price ratios.
- get_
amounts_ for_ liquidity - Calculates the token amounts required for a given liquidity position.
- get_
next_ sqrt_ price_ from_ input - Calculates the next sqrt price given an input amount.
- get_
next_ sqrt_ price_ from_ output - Calculates the next sqrt price given an output amount.