# CPMM Formula

The **Constant Product Market Maker** (CPMM) formula is a mathematical formula that is used in some cryptocurrencies to determine the price of a [token](/glossary/definitions/smart-contracts/tokens.md). It is based on the concept of market making, where a market maker provides liquidity to a market by continuously buying and selling a particular asset.

The CPMM formula uses two variables to determine the price of a token: the constant product (C) and the total supply of tokens (S). The constant product is a predetermined value that is set by the creators of the token. It represents the product of the supply and the price of the token at any given time.

The formula for the CPMM is as follows:

`Price = C / S`

In other words, the price of the token is equal to the constant product divided by the total supply of tokens.

The CPMM formula has a number of advantages over other market making formulas. It allows for the creation of a stable and predictable market for the token, and it ensures that the price of the token remains constant even as the total supply of tokens changes. This can make it an attractive option for investors who are looking for a stable and predictable market for their assets.

However, the CPMM formula is not without its drawbacks. Because the price of the token is determined by the constant product and the total supply of tokens, it can be susceptible to manipulation by the creators of the token. It's possible that the constant product may not accurately reflect the true value of the token, which could lead to market inefficiencies.


---

# 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.allforone.app/glossary/definitions/decentralized-exchanges/cpmm-formula.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.
