Function decreaseLiquidityQuoteByLiquidity

  • Get an estimated quote on the minimum tokens receivable based on the desired withdraw liquidity value.

    Parameters

    • liquidity: BN

      The desired liquidity to withdraw from the Whirlpool

    • slippageTolerance: Percentage

      The maximum slippage allowed when calculating the minimum tokens received.

    • position: Position

      A Position helper class to help interact with the Position account.

    • whirlpool: Whirlpool

      A Whirlpool helper class to help interact with the Whirlpool account.

    • tokenExtensionCtx: TokenExtensionContextForPool

    Returns DecreaseLiquidityQuote

    An DecreaseLiquidityQuote object detailing the tokenMin & liquidity values to use when calling decrease-liquidity-ix.