# Remove liquidity

## 1. Remove liquidity

You can directly remove liquidity through the remove liquidity method in the Cetus DLMM pool module.

```rust
/// Removes liquidity from a position and returns the underlying tokens.
///
/// This function removes liquidity from the specified bins of a position
/// and returns the corresponding token amounts. It handles bin cleanup if empty.
///
/// ## Type Parameters
/// - `CoinTypeA`: First token type in the pool
/// - `CoinTypeB`: Second token type in the pool
///
/// ## Parameters
/// - `pool`: Mutable reference to the pool
/// - `position`: Mutable reference to the position
/// - `bins`: Vector of bin IDs for liquidity removal
/// - `liquidity_shares`: Vector of liquidity shares to remove from each bin
/// - `config`: Global configuration
/// - `versioned`: Versioned object for compatibility check
/// - `clk`: Clock for timestamp tracking
/// - `ctx`: Transaction context
///
/// ## Returns
/// - `(Balance<CoinTypeA>, Balance<CoinTypeB>)`: Token balances returned
///
/// ## Events Emitted
/// - `RemoveLiquidityEvent`: Contains position and liquidity delta information
public fun remove_liquidity<CoinTypeA, CoinTypeB>(
    pool: &mut Pool<CoinTypeA, CoinTypeB>,
    position: &mut Position,
    bins: vector<u32>,
    liquidity_shares: vector<u128>,
    config: &GlobalConfig,
    versioned: &Versioned,
    clk: &Clock,
    ctx: &TxContext,
): (Balance<CoinTypeA>, Balance<CoinTypeB>) {
    abort 1
}
```

## 2. Remove full range liquidity by percent

```rust
/// Removes full range liquidity from a position specified by numerator and denominator.
///
/// ## Type Parameters
/// - `CoinTypeA`: First token type in the pool
/// - `CoinTypeB`: Second token type in the pool
///
/// ## Parameters
/// - `pool`: Mutable reference to the pool
/// - `position`: Mutable reference to the position
/// - `numerator`: Numerator of the percentage
/// - `denominator`: Denominator of the percentage
/// - `config`: Global configuration
/// - `versioned`: Versioned object for compatibility check
/// - `clk`: Clock for timestamp tracking
/// - `ctx`: Transaction context
///
/// ## Returns
/// - `(Balance<CoinTypeA>, Balance<CoinTypeB>)`: Token balances returned
///
/// ## Events Emitted
/// - `RemoveLiquidityEvent`: Contains position and liquidity delta information
public fun remove_full_range_liquidity_by_percent<CoinTypeA, CoinTypeB>(
    pool: &mut Pool<CoinTypeA, CoinTypeB>,
    position: &mut Position,
    numerator: u128,
    denominator: u128,
    config: &GlobalConfig,
    versioned: &Versioned,
    clk: &Clock,
    ctx: &TxContext,
): (Balance<CoinTypeA>, Balance<CoinTypeB>){
    abort 1
}
```
