📚 | Pools Models

The Auto Market Maker (AMM) is the core of pool models and liquidity pools, instead of using the Oracle price, AMMs determine the prices by the algorithm.

Volatile Pools

Volatile pools are defined as assets that have no direct correlation in price, examples are Bitcoin (BTC) and Ethereum (ETH). The price of ETH has no relation to the price of BTC.
The Classic Pool is built for general-purpose tradings and utilizes the constant product algorithm:
tokenA_balance(p) * tokenB_balance(p) = k
and popularized by Uniswap as:
x * y = k
The constant, represented by “k” means there is a constant balance of assets that determines the price of tokens in a liquidity pool.

Stable Pools

Stable pools are defined as assets that have a direct correlation to each other. Examples are USDC/USDT, USDT/DAI etc. The price of the 2 assets will trade very close to each other and thus a different approach can be taken to allow for much higher volume at low slippage.
Stable pairs use the following formula to determine the price, used for the first time by Solidly:
x³y + y³x ≥ k

Image representation

The blue curve visualizes the stable formula while the red curve shows the volatile formula