> For the complete documentation index, see [llms.txt](https://docs.nabla.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nabla.fi/developers/contract-interfaces/genericpool.md).

# GenericPool

Abstract contract containing common logic for all pools Each pool manages can hold a specific pool asset, which is an ERC20 token At the same time the pool is itself an ERC20 contract representing an LP token ("pool shares"). This contract takes care of - depositing pool tokens and at the same time minting LP tokens - withdrawing pool tokens and at the same time burning LP tokens It is abstract and does not take any assumptions about how the amount of pool tokens and LP tokens are related

***

### poolAsset

```solidity
contract IERC20 poolAsset
```

Asset held by the pool

***

### poolAssetDecimals

```solidity
uint8 poolAssetDecimals
```

The decimals of the pool asset

***

### poolCap

```solidity
uint256 poolCap
```

Maximum amount of `poolAsset` that can be deposited into this pool

***

### asset

```solidity
function asset() public view returns (address _token)
```

Returns the pooled token's address

#### **Return Values**

| Name    | Type    | Description                 |
| ------- | ------- | --------------------------- |
| \_token | address | Address of the pooled asset |

***

### assetDecimals

```solidity
function assetDecimals() public view returns (uint8 _decimals)
```

Returns the decimals of the pool asset

#### **Return Values**

| Name       | Type  | Description            |
| ---------- | ----- | ---------------------- |
| \_decimals | uint8 | The number of decimals |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.nabla.fi/developers/contract-interfaces/genericpool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
