Skip to main content

IMarketRemoveLiquidity.sol

IMarketRemoveLiquidity

The interface for removing and withdrawing liquidity in a market.

removeLiquidity

function removeLiquidity(address recipient, int16 tradingFeeRate, bytes data) external returns (struct LpReceipt)

Removes liquidity from the market.

  • Parameters:

    NameTypeDescription
    recipientaddressThe address to receive the removed liquidity.
    tradingFeeRateint16The trading fee rate for the liquidity.
    databytesAdditional data for the liquidity callback.
  • Return Values:

    NameTypeDescription
    [0]struct LpReceiptThe liquidity receipt.

removeLiquidityBatch

function removeLiquidityBatch(address recipient, int16[] tradingFeeRates, uint256[] clbTokenAmounts, bytes data) external returns (struct LpReceipt[])

Removes liquidity from the market.

  • Parameters:

    NameTypeDescription
    recipientaddressThe address to receive the removed liquidity.
    tradingFeeRatesint16[]An array of fee rates for each liquidity bin.
    clbTokenAmountsuint256[]An array of clb token amounts to remove as liquidity for each bin.
    databytesAdditional data for the liquidity callback.
  • Return Values:

    NameTypeDescription
    [0]struct LpReceipt[]The liquidity receipt.

withdrawLiquidity

function withdrawLiquidity(uint256 receiptId, bytes data) external

Withdraws liquidity from a liquidity receipt.

  • Parameters:

    NameTypeDescription
    receiptIduint256The ID of the liquidity receipt.
    databytesAdditional data for the liquidity callback.

withdrawLiquidityBatch

function withdrawLiquidityBatch(uint256[] receiptIds, bytes data) external

Withdraws liquidity from a liquidity receipt.

  • Parameters:

    NameTypeDescription
    receiptIdsuint256[]The array of the liquidity receipt IDs.
    databytesAdditional data for the liquidity callback.