• Convert a sqrt priceX64 into a tick index 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.

    Parameters

    • sqrt_price - The sqrt priceX64 to convert
    • decimals_a - The number of decimals of the base token
    • decimals_b - The number of decimals of the quote token

    Returns

    • f64 - The decimal price

    Parameters

    • sqrt_price: bigint
    • decimals_a: number
    • decimals_b: number

    Returns number