Static
getCalculate the sqrtPriceX64 & tick index slippage price boundary for a given price and slippage. Note: This function loses precision
the sqrtPriceX64 to apply the slippage on
the slippage to apply onto the sqrtPriceX64
the sqrtPriceX64 & tick index slippage price boundary
Static
invertUtility to invert the price Pb/Pa to Pa/Pb NOTE: precision is lost in this conversion
Pb / Pa
Decimals of original token A (i.e. token A in the given Pb / Pa price)
Decimals of original token B (i.e. token B in the given Pb / Pa price)
inverted price, i.e. Pa / Pb
Static
invertUtility to invert the sqrtPriceX64 from X64 repr. of sqrt(Pb/Pa) to X64 repr. of sqrt(Pa/Pb) NOTE: precision is lost in this conversion
X64 representation of sqrt(Pb / Pa)
inverted sqrtPriceX64, i.e. X64 representation of sqrt(Pa / Pb)
Static
priceStatic
priceStatic
priceStatic
sqrtStatic
sqrtStatic
tickStatic
tick
A collection of utility functions to convert between price, tickIndex and sqrtPrice.