Remove Liquidity

Use the remove_liquidity_entry function from the router module.

 public entry fun remove_liquidity_entry(
        lp: &signer,
        token_1: Object<Metadata>,
        token_2: Object<Metadata>,
        is_stable: bool,
        liquidity: u64,
        amount_1_min: u64,
        amount_2_min: u64,
        recipient: address,
    ) {
        ...
    }

Function Parameters

  • lp: The transaction signer (liquidity provider).

  • token_1: First token object.

  • token_2: Second token object.

  • is_stable: Indicates whether the pool is stable.

  • liquidity: LP tokens to burn.

  • amount_1_min: Min amount of token_1

  • amount_2_min: Min amount of token_2

  • recipient: Address to receive assets.

Last updated