> For the complete documentation index, see [llms.txt](https://midaswap.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://midaswap.gitbook.io/docs/concepts/lp-token.md).

# LP Token

Liquidity Book was originally proposed by Trade joe. In Trade Joe's initial design, LP Token was ERC1155 asset, but it was modified to ERC721 asset in Midaswap. The reason is that Midaswap deals with the matching of NFT assets, and each NFT asset has its own independent Token ID. Therefore, whether the trader buys NFTs from the Pool or sells NFTs to the Pool, the ultimate ownership of each NFT asset needs to be clear. Through NFT LP Token, each LPs in Midaswap can have its own Token ID number, so users can liquidate NFT assets through the ID number of LP Token.

### **NFT Liquidation in Pool**

When LP provides liquidity, he will get ERC721 LP Token. Each NFT LP Token has a unique corresponding Token ID. Midaswap's NFT Vault contract will identify the NFT\&FT assets provided by LP in the Pool through the LP Token ID. The Vault contract updates the NFT asset ownership each time a trader trades with the NFT\&FT asset belonging to the LP. When the trader purchases an NFT from the NFT liquidity provided by the LP, the NFT Vault will delete the sold NFT Token ID information and add ETH and fees to the LP Token Token ID. When a trader sells an NFT to the ETH provided by an LP, the NFT Vault will add the acquired NFT Tokenid information and add the acquired NFT and fee to the LP Token Tokenid. With each transaction, the Pool liquidates the NFT asset and fee information in real time, and when the LP takes the NFT LP Token to remove the liquidity, he can see the final NFT, FT, and fee data they hold.


---

# 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://midaswap.gitbook.io/docs/concepts/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.
