Skip to main content

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.

How Does the Concept of Slippage Relate to the Size of the Constant Product (K) in an AMM Pool?
How Does Variation Margin Contribute to the ‘Zero-Sum’ Nature of Futures Trading?
How Does an Automated Market Maker (AMM) Algorithm Maintain the Constant Product in a Liquidity Pool?
How Does the Redemption Mechanism Support a Stablecoin’s Peg during High Demand?