# LPB-AMM

{% hint style="info" %}
In YFX V4, a new LP Balance Automated Market Maker (LPB-AMM) mechanism is introduced, where the depth of users' trades is determined by the LP's Balance. The greater the LP Balance, the better the trading depth for users; conversely, the lesser the LP Balance, the poorer the trading depth.
{% endhint %}

In the classic UniSwap AMM model, the $$x\*y = k$$ curve is used to calculate the liquidity of the entire market. Under YFX's LPB-AMM model, a new linear function $$y=kx+b$$ is employed, utilizing segmented functions to mimic the depth chart found in CEX (Centralized Exchanges).&#x20;

This approach ultimately achieves a depth chart similar to the ones observed in centralized trading platforms, offering a more nuanced and dynamic representation of market depth that adjusts according to the balance and participation of liquidity providers.&#x20;

<figure><img src="/files/E5f4fvqS5TV3aCEaN2xj" alt=""><figcaption></figcaption></figure>

### Highlights of the LPB-AMM Model in YFX V4

The LPB-AMM model introduced in YFX V4 marks a significant advancement in decentralized finance by bridging the gap between traditional and decentralized finance platforms. Below are some of the standout features of this innovative model:

* **Dynamic Trading Depth**: The depth of trades directly correlates with the LP's Balance, enabling deeper and more liquid trades for participants with greater contributions.
* **Enhanced Market Depth Visualization**: This model provides a depth chart similar to those found in centralized exchanges, thereby offering users a familiar trading experience with the benefits of decentralized security and autonomy.
* **Adaptable Market Dynamics**: The liquidity and depth of the market adjust in real-time based on the activity and balance of liquidity providers, promoting a more responsive and balanced trading environment.

This innovative approach not only enhances the trading experience on decentralized platforms but also paves the way for further integration of traditional financial mechanisms into the DeFi space.


---

# 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/lpb-amm.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.
