# Adding/Removing Liquidity

**`add_liquidity<CURRENCY>(...)`**\
**Purpose**: Add NFTs and tokens to an existing pool to deepen liquidity and earn more LP tokens.\
**Process**:

1. Check that the pool is active and the caller has sufficient `UserBalance`.
2. Calculate how many LP tokens to mint based on the proportional share of liquidity added.
3. Emit a `LiquidityAdded` event.

**`remove_liquidity<CURRENCY>(...)`**\
**Purpose**: Remove some or all of a user’s liquidity from a pool, returning NFTs and tokens proportional to their share and burning their LP tokens.\
**Process**:

1. Ensure the user has enough LP tokens to redeem.
2. Calculate the share of NFTs and tokens to return.
3. Emit a `LiquidityRemoved` event.

**Use Cases**:

* Liquidity providers can enter and exit positions on their terms.
* Encourage dynamic, market-driven liquidity rather than static listings.

**Best Practices**:

* Use batch operations for large-scale liquidity additions or removals.
* Monitor pool composition to maintain a healthy NFT-to-token ratio.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.artinals.com/artinals-protocol/trade-module/functions-and-entry-points/adding-removing-liquidity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
