# IMM Balancing Indicator

The current total value of the pool is:

<div align="center"><img src="/files/eMD2KPjfJVZcqX6SHlGk" alt=""></div>

We define the pool as balanced if Xc \* rX = Yc\* rY, i.e., the values of the LP token and ETH assets in the pool are equal.

So, we can determine the pool to be balanced if:

<div align="center"><img src="/files/AIsuP3hpfzR6imkdlxsC" alt=""></div>

The parameter ![](/files/DdJvGST0hFakr0FkPpnZ) is used to measure the pool diversion from equilibrium state:

If q>1 there is a shortage of ETH.

If q>1 there is a shortage of ETH.

Function f(q) is used to adjust the Oracle price according to the pool state.

<div align="center"><img src="/files/LgEln7Ehg0JR6wmdxgSD" alt=""></div>

The parameters a, b are set on the following range:

0 <= b < 1

0 <= a < ∞

Due to solidity efficiency limitations, parameter “a” can only be set to values starting from 0 and increasing in 0.5 increments till infinity.

If q = 1, f(q) = 1, the pool is in equilibrium state and no adjustments are applied to the Oracle price.

If q>1, f(q) < 1, the pool is in shortage of ETH and the pool internal rate will be less than the Oracle price.

If q<1, f(q) > 1, the pool is in shortage of LP token and the internal rate will be higher than Oracle price.

<br>


---

# 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://flype-protocol.gitbook.io/flype-protocol/imm/the-math-behind-imm/imm-balancing-indicator.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.
