# Related Pricing

As every economic system, the price will be determined by supply and demand. In our particular case scenario, prices of tokens in an LP are determined by the supply of the tokens, i.e., the amounts of reserves of the tokens that the pool is holding. Token prices are simply relations of reserves:

$$P\_x = \frac{y}{x} ; P\_y = \frac{x}{y}$$

Where $$P\_x$$ and $$P\_y$$ are prices of tokens in terms of the other token. Such prices are called spot prices and they only reflect current market prices. Howe- ver, the actual price of a trade is calculated differently as high demand increases price. We want the price to be high when demand is high, and we can use pool reserves to measure the demand: the more tokens you want to remove from an LP, the higher the impact of demand is. Mathematically:

$$\Delta y = \frac{(y \cdot \Delta x)}{(x + \Delta x)}$$

$$\Delta x = \frac{x \cdot y}{y - \Delta y)}$$


---

# 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://artichoke.gitbook.io/abstract/single-sided-lp-mechanics/related-pricing.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.
