How Do “Stableswap” AMMs Modify the X Y=k Formula to Reduce Impermanent Loss for Stablecoins?
Stableswap AMMs, like Curve Finance, use a bonding curve that is a hybrid of the constant product (x y=k) and the constant sum (x+y=k) formulas. This hybrid formula, often called the "stableswap invariant," is designed to keep the exchange rate very close to 1:1 for stablecoin pairs.
It provides much deeper liquidity near the 1:1 peg, resulting in extremely low slippage and minimal impermanent loss as long as the stablecoins maintain their peg. If the peg breaks, the curve behaves more like x y=k.