# Price Impact

> In YFX versions V1, V2, and V3, the trading price solely depended on the index price and the slippage calculation formula, leading to issues such as imbalance between long and short positions. Over time, as decentralized perpetual contract products adopting the PvPool model emerged, discussions began to revolve around Price Impact, Depth, Premium, and Funding, with different solutions being proposed for each issue.

Building on these solutions, YFX V4 introduced the LP Balance Automated Market Maker (LPB-AMM) mechanism, where the trading depth in YFX is determined by the LP Balance. A greater LP Balance results in better depth and lower slippage, whereas a lesser LP Balance leads to worse depth and higher slippage.

When an imbalance between long and short positions occurs, the Premium will increase, causing the Market Price to deviate from the Index Price. At this point, the Price Impact becomes more favorable towards the direction with smaller positions, thus gradually balancing out the long and short positions.


---

# 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.yfx.com/yfx-v4/trading/price-impact.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.
