# LP Account

The LP account holds staged funds for users.\
There is one LP account per pool per user.\
This is useful when users want to provide liquidity that requires a non-zero amount in both pool tokens.

***

## Interface

### `get_titan_lp_account_data`

Returns user's LP account data.

**Arguments**

*None*

**Returns**

| Data Type | Description          |
| --------- | -------------------- |
| `slice`   | User address         |
| `slice`   | Pool manager address |
| `int`     | Amount0 staged       |
| `int`     | Amount1 staged       |

***

## Messages

### Stage Liquidity

```plaintext
Opcode: 0xb4eb90ef
```

**Body Format**

| Data Type      | Description          |
| -------------- | -------------------- |
| `Uint32`       | Opcode               |
| `Uint64`       | Query ID             |
| `Coins`        | Amount0              |
| `Coins`        | Amount1              |
| `Coins`        | Provide amount0      |
| `Coins`        | Provide amount1      |
| `Int32`        | Low tick             |
| `Int32`        | High tick            |
| `Uint128`      | Liquidity to provide |
| `Int32`        | Pool index           |
| `^Cell`        | Farm data cell       |
| `Uint1`        | Should stake         |
| `Maybe Uint32` | Farm index           |

***

### Refund User

```plaintext
Opcode: 0x0bf3f447
```

**Body Format**

| Data Type | Description |
| --------- | ----------- |
| `Uint32`  | Opcode      |
| `Uint64`  | Query ID    |

***

### Directly Add Liquidity

```plaintext
Opcode: 0x8dc3c672
```

**Body Format**

| Data Type      | Description      |
| -------------- | ---------------- |
| `Uint32`       | Opcode           |
| `Uint64`       | Query ID         |
| `Int32`        | Low tick         |
| `Int32`        | High tick        |
| `Coins`        | Amount0          |
| `Coins`        | Amount1          |
| `Uint128`      | Liquidity to add |
| `Int32`        | Pool index       |
| `^Cell`        | Farm data        |
| `Uint1`        | Should stake     |
| `Maybe Uint32` | Farm index       |


---

# 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.titan.tg/colossus-concentrated-liquidity-amm/smart-contracts/lp-account.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.
