Stable Pools

Overview

Stable Pools were pioneered by Andre Cronje's Curve Finance. They marked a revolution in Decentralized Exchange technology by enabling efficient low slippage swaps between assets expected to always trade at or near-parity. (e.g. stablecoins, pegged assets).

How Stable Pools Work

First of all, imagine a liquidity provider which has a constant price. If you have two coins X and Y , for example, selling dx of coin X will lead to buying −dy = dx of coin Y . This can be generalized for any number of coins Xi having a "linear" invariant: Xxi = const. The price is determined as −dxi/dxj which is, in this case, always precisely 1. This doesn't work in a fluctuating market unless the price is adjusted all the time. It can be done with price oracles, but it has risks and is not very decentralized. It's possible to improve on this. Adjusting the prices in such a way that the “portfolio” (which is usually just two coins) is rebalanced (so that value of coin X and Y in the liquidity pool, when expressed in the same currency, is the same). It appears that this is given automatically when you keep product of quantities of coins in the liquidity pool constant: xy = const.

As expected, the price (equal to derivative) only slightly deviates from 1 when number of coins is closed to balance. The portfolio consists of coins X and Y, which have the "ideal" price of 1.0. There are x = 5 and y = 5 coins loaded up initially.

The StableSwap invariant has an "amplification coefficient" parameter: the lower it is, the closer the invariant is to the constant product. When calculating slippage, we use a practical value of A = 100. This is somewhat comparable to using Uniswap with 100x leverage.

If the price appears to be shifted from equilibrium point (1.0), the invariant starts operating in a suboptimal point, still however providing some liquidity (in most cases larger than constant-product constant, if optimal A was correctly 3 found).

Through Stable Pools Wavelength offers a better trading experience, which captures volume, therefore a larger quantity of swap fees for liquidity providers.

Advantages

Low Price Impact

Traders enjoy tighter spreads and lower price impact. These pools allow for larger trades of assets before encountering significant price impact.

Stable Swaps

One of the key advantages to having Stable Pools on Wavelength specifically is that they are plugged into the same protocol as all other pools. Swapping between stable coins is frequently used for arbitrage when one token is paired with two different stable coins in different pools. By leveraging Batch Swaps on Wavelength, these trades can be combined into a single, gas-efficient transaction.

Last updated