Simulations and performances

Figures 1, 2, and 3 below display IMM price functions in comparison with common AMM price functions simulated with three states:

  1. LP tokens shortage (q=0.5)

  2. Equilibrium (q=1.0)

  3. ETH shortage (q=2.0)

The relative effective price Pb/ rXY for a buy trade and Ps / rXY for a sell trade is shown as a function of the relative trade amount.

For the IMM graphs, we have used equations (6), (7), and (12) with the following parameters:

  • b = 0.2

  • a = 1.0

When q = 1.0 (equilibrium state), the IMM and common AMM price functions are equal.

When q =0.5 and q = 2 (the pool state is far from equilibrium) the IMM price function is significantly closer to the market price, thereby minimizing the price gap in comparison with common AMMs (for relative trade amounts < than 10% of total pool amount that should be the usual case).

When a trade amount is significantly high in relation to the pool total value, the IMM pricing mechanism will discourage these trades to minimize divergence loss.

LP token Shortage (q=0.5)

The graph below displays IMM price functions in comparison with a common AMM. At this state, Q<1.

Equilibrium State (q=1.0)

The graph below displays the IMM price functions in comparison with a common AMM. At this state, Q=1.0.

Figure 2 - Effective Price vs Trade Amount X, for q=1.0

ETH Shortage (q=2.0)

The graph below displays IMM price functions in comparison with a common AMM. At this state, Q>1.

Figure 3 - Effective Price vs Trade Amount X, for q=2.0

Last updated