• The token amounts Raydium charges (rounding up) when adding liquidity at price sqrtRatioX64 over [sqrtA, sqrtB] — port of Raydium's get_delta_amounts_signed, the amounts an open actually pulls from the bucket signer accounts. Because getLiquidityFromAmounts rounds down and this rounds up, the charged amounts never exceed the budgets the liquidity was computed from (the invariant is property-tested on the Rust side in liquidity_math.rs).

    Parameters

    • sqrtRatioX64: bigint
    • sqrtRatioAX64: bigint
    • sqrtRatioBX64: bigint
    • liquidity: bigint

    Returns {
        amount0: bigint;
        amount1: bigint;
    }

    • amount0: bigint
    • amount1: bigint

Generated using TypeDoc