# Rebalancing

Although concentration and the use of an oracle are sufficient for the protocol to efficiently market make, it lacks the simplicity of standard constant product pools where the total value of each asset in a pool are always equal. To add a similar property while maximizing profit, the protocol rebalances its pools by adjusting their liquidity.

This adjustment of liquidity occurs on every trade and/or change in oracle price according to the following formulae.

To increase liquidity for x:

$$
K\_{adjusted} = K ⋅ (x ⋅ p / y)^z
$$

To decrease liquidity for x:&#x20;

$$
K\_{adjusted} = K ⋅ (y / (x ⋅ p))^z
$$

where K is the total amount of liquidity, p is the price of x provided by the oracle, and z is the parameter that determines the magnitude of the adjustment.

For example, when x comprises less than 50% of the total value of the pooled assets, the market maker will decrease liquidity for buyers of x and increase liquidity for sellers of x in an effort to regain balance. This will incentivize traders to sell against the pool while discouraging them from buying, ensuring that the pool balance regresses to the bonding curve.


---

# 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.lifinity.io/dex/rebalancing.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.
