> For the complete documentation index, see [llms.txt](https://docs.mangata.finance/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mangata.finance/welcome/guides/technical-guides/how-to-check-the-value-of-an-lp-token.md).

# How to check the value of an LP token

To calculate the value of an LP token, we will find the total number of LP tokens and the number of tokens in the associated liquidity pool.

Open the developer portal to see the [chain state](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-archive.mangata.online#/chainstate). Find the token ID [here](/welcome/guides/technical-guides/how-to-look-up-token-ids.md).

### Find the number of total LP tokens

Check `tokens.totalIssuance` with the token ID as parameter.

<figure><img src="/files/tIYG9008PsmNiY9ynIoU" alt=""><figcaption></figcaption></figure>

### Find the number of tokens in the liquidity pool

Get the token IDs of the token in the pool (the order is important) with `xyk.liquidityPools` and the LP token ID in the param.

<figure><img src="/files/wpmkOLSBRNyKZt5XKuBw" alt=""><figcaption></figcaption></figure>

Then call `xyk.pools` with the params you just got as a result, you will get the number of tokens in the pool.

<figure><img src="/files/XNlAGEcWI4uQFKjCLPDs" alt=""><figcaption></figcaption></figure>


---

# 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:

```
GET https://docs.mangata.finance/welcome/guides/technical-guides/how-to-check-the-value-of-an-lp-token.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.
