> For the complete documentation index, see [llms.txt](https://docs.icpex.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.icpex.org/icpex-intro/pmm-algorithm.md).

# PMM Algorithm

## Overview

The PMM(Proactive Market Maker) algorithm is an inventory management strategy. When the quantity of a certain asset becomes low, the PMM algorithm will automatically increase the quotation of this asset in the hope of buying back the missing inventory from the market.&#x20;

## Using Canister to Providing liquidity

ICPEx has implemented the canister version of the PMM algorithm. The concept of orders does not exist in canister, but is replaced by the supply and consumption of liquidity.

Put the funds into the canister and set the parameters to realize the supply of liquidity. Trading assets directly with canister completes the consumption of liquidity. In this process, the capital pool exists as a counterparty to all users.

## Trading Fees

In the current version, trading fees use the asset class received by the trader. For example, if a user uses ICP to buy IEX, IEX is paid to the liquidity pool as a trading fee. If the user uses IEX to buy ICP, the ICP is paid to the liquidity pool as a trading fee.


---

# 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.icpex.org/icpex-intro/pmm-algorithm.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.
