What Is the Significance of the “Invariant” in Curve Finance’s StableSwap AMM?
The Invariant in Curve Finance's StableSwap AMM is a special function that blends the constant product (x y=k) and constant sum (x+y=k) formulas. This hybrid invariant creates a very flat price curve near the 1:1 peg, allowing for massive trades with minimal slippage and impermanent loss for pegged assets.
When the price deviates significantly from the peg, the curve becomes steeper, acting more like a CPMM to discourage further imbalance.