LogoLogo
Start hereWhy Flype?Less divergence LossIMMath
  • Vaults
    • UNI-V3 Vaults
    • Strategies
    • Strategy manager
    • Security audit
    • Deployment Addresses
  • Liquidity Exchange
    • Flype Liquidity Exchange
    • Flype-between
    • Flype-in
    • Flype-out
    • Pools
    • Multiple Yields
    • Advantages
  • IMM
    • Background
    • Pools & Oracle Market Price
    • Execution of Trades
    • Three Possible States in IMM
    • The Math Behind IMM
      • IMM Notation
      • IMM Functions
      • IMM Balancing Indicator
      • IMM - Arbitrage Trades
      • Transaction fee
      • Adding Liquidity
      • Removing Liquidity
      • IMM Advantages
      • Simulations and performances
  • Resources
    • FAQ
    • Roadmap
    • References
    • Official Links
Powered by GitBook
On this page

Was this helpful?

  1. IMM
  2. The Math Behind IMM

IMM Balancing Indicator

PreviousIMM FunctionsNextIMM - Arbitrage Trades

Last updated 3 years ago

Was this helpful?

The current total value of the pool is:

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:

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.

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.

The parameter is used to measure the pool diversion from equilibrium state: