> For the complete documentation index, see [llms.txt](https://docs.yfx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yfx.com/yfx-v4/trading/price-impact.md).

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