Curve AMM
Curve's Automated Market Maker (AMM) is built around two core invariants — StableSwap for assets that trade near parity, and CryptoSwap for volatile asset pairs. Both algorithms have gone through multiple iterations, with the current generation ("-NG") contracts offering significant gas optimizations, built-in LP tokens, and improved oracle support.
For the mathematical foundations, see the StableSwap whitepaper and the CryptoSwap whitepaper.
Current Implementations
Stableswap-NGNext-generation StableSwap pools for stablecoins and pegged assets. Supports plain pools and metapools with multiple asset types (standard ERC-20, rebasing, ERC-4626).
Twocrypto-NGOptimized 2-coin CryptoSwap pools for volatile asset pairs with auto-rebalancing, built-in ERC-20 LP tokens, and a hardcoded 50% admin fee.
Tricrypto-NGOptimized 3-coin CryptoSwap pools with native transfer support. Used for major volatile pairs like ETH/BTC/USD.
Pool FactoryPermissionless deployment of liquidity pools, gauges, and LP tokens across all pool types and chains.
RouterOn-chain router that finds optimal swap routes across Curve pools, supporting up to five tokens in a single transaction.
Legacy ContractsEarlier implementations of StableSwap and CryptoSwap pools, factory contracts, LP tokens, and deposit contracts. Superseded by the NG versions above.