AMM Price Curve

Kriya Swap currently has two pools having different pricing curves. While creating pools, users can configure the pool type and the pricing and fee structure of the pool will work accordingly.

Constant Product Pools (Uncorrelated)

Inspired by Uniswap V2's AMM design. Suitable for trading uncorrelated asset pairs. Perfect for bootstrapping liquidity for long-tail altcoins.

Most AMMs utilize this Constant Product Function - a formula for calculating two tokens' relative prices that ensures that a pool will not be drained as a result of any liquidity event. The standard liquidity curve function looks as follows:

x * y = k

In the formula, X and Y are the amounts of the two tokens in a pool, and their product k is a constant. Any trade (swap) changes the amounts X and Y, but k remains the same. This formula is suitable for uncorrelated swaps (assets whose prices aren't correlated with each other) and works well in most cases, including on Kriya Swap.

For swaps between stablecoins and other correlated assets, however, the simple constant product formula is not very effective.

Stable Swap Pools

Decentralized swaps between stablecoins like USDT, USDC, and DAI have always been a challenge for popular DEXes like Uniswap or SushiSwap because of high slippage.

When using the constant product formula, a single large swap can significantly affect a token’s price, especially when liquidity in the pool is shallow. For stablecoins this is unacceptable, as they should always trade 1:1 (or almost) to each other and are mostly traded in size.

The same goes for pairs like BTC/WBTC and ETH/WETH. They are also called correlated assets, as their relative prices are (or should be) almost ideally correlated.

Hence, Kriya's Stable Swap pools use this formula for price discovery:

x^3*y + x*y^3 = k

Last updated