# Liquidity Pools

**Extract key attributes of a position**

```
public fun extract_core_position(
    position: &Position,
): (u64, u32, u32, u128, u256, u256, u64, u64)
```

**Function arguments**

| position | \&Position | The current position to extract detailed data. |
| -------- | ---------- | ---------------------------------------------- |

**Returns**

| `u64`  | Position identifier                  |
| ------ | ------------------------------------ |
| `u32`  | Lower tick boundary                  |
| `u32`  | Upper tick boundary                  |
| `u128` | Liquidity value                      |
| `u256` | Fee growth inside for token 0        |
| `u256` | Fee growth inside for token 1        |
| `u64`  | Pending fees for position in token 0 |
| `u64`  | Pending fees for position in token 1 |

**Extract position rewards**

```
public fun extract_position_rewards(
    position: &Position,
): vector<PositionRewardInfo>
```

**Function arguments**

| `position` | `&Position` | A reference to the position from which reward details are retrieved |
| ---------- | ----------- | ------------------------------------------------------------------- |

**Returns**

| `vector<PositionRewardInfo>` | A vector containing all reward information records of the position |
| ---------------------------- | ------------------------------------------------------------------ |

**Extract reward info of a position**

This function is used to extract the detailed reward data from a position reward information.

```
public fun extract_reward_info(
    reward_info: &PositionRewardInfo,
): (u256, u64)
```

**Function arguments**

| `reward_info` | `&PositionRewardInfo` | A reference to the reward info record to extract detailed data |
| ------------- | --------------------- | -------------------------------------------------------------- |

**Returns**

| `u256` | The reward growth accumulated |
| ------ | ----------------------------- |
| `u64`  | The pending reward amount     |


---

# 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.evo.market/technical/clmm/examples/liquidity-pools.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.
