Michael Egorov created Curve Finance, and it launched in January 2020 with a specific focus. The goal was a DEX optimised for swapping between assets that should have the same value, mainly stablecoins (USDC, USDT, DAI) and liquid staking tokens (stETH, rETH). Uniswap's x*y=k formula spreads liquidity across all possible prices, which is appropriate for assets with uncertain relative value. For stablecoins and pegged assets where the price should always be approximately $1 (or approximately equal to the peg), this approach is extremely capital-inefficient and introduces unnecessary slippage. Curve's StableSwap invariant concentrates liquidity near the peg price, which allows $100M+ stablecoin swaps with 0.01–0.04% slippage. Uniswap's formula can't do that at the same TVL. This efficiency made Curve the default stablecoin liquidity layer for all of DeFi: protocols that need to swap stablecoins route through Curve, and liquidity providers who want stable, low-impermanent-loss yield deposit into Curve.
The StableSwap Invariant: How It Works
Curve's AMM formula is a blend of Uniswap's constant product (x*y=k) and a constant sum (x+y=k). The constant sum formula holds a 1:1 exchange rate regardless of trade size, which is perfect for stablecoins at peg. It breaks down when a pool becomes imbalanced, though, because traders could drain one asset to zero. The constant product formula handles imbalanced pools well but causes unnecessary slippage when assets are near parity. Curve's StableSwap blends the two: when the pool is balanced near parity, it behaves like a constant sum (minimal slippage). As the pool becomes imbalanced, it transitions toward constant product behaviour (higher slippage, protecting liquidity providers from one-sided drainage). The amplification coefficient (A) controls this transition. Higher A means more constant-sum behaviour and lower slippage but more vulnerability to depegging events. Curve governance can adjust A for each pool, making it a key parameter optimised per pool type.
veCRV: The Vote-Escrow Governance Model
Curve's governance token CRV can be locked for up to 4 years in exchange for veCRV (vote-escrowed CRV). veCRV can't be transferred, and it's purely a representation of governance power that decays to zero at the lock expiry. veCRV has two critical powers, and the first is Gauge weight votes, where veCRV holders allocate CRV emissions (the reward distributed to LPs) among Curve's liquidity pools. Pools with more gauge weight receive more CRV rewards, attracting more liquidity. Fee income: 50% of Curve's trading fees are distributed to veCRV holders (currently paid in 3CRV, the Curve stablecoin LP token). This system creates the "Curve Wars". Protocols that want deep liquidity for their own tokens on Curve (to support their DeFi product) need CRV emissions directed to their pool. That takes veCRV gauge votes, which means either holding large amounts of veCRV or bribing veCRV holders to vote for their pool. The Curve Wars meta-game has made veCRV accumulation a strategic priority for major DeFi protocols, particularly those issuing stablecoins (Frax, Alchemix, Abracadabra) that need cheap stablecoin liquidity.
Convex Finance and the Curve Wars Ecosystem
Convex Finance is the dominant Curve yield maximiser: deposit Curve LP tokens into Convex, earn boosted CRV rewards (without needing to lock your own CRV for boost) plus CVX token rewards. Convex accumulated 50%+ of all veCRV by aggregating CRV from its depositors and locking it, giving Convex enormous gauge weight voting power. This created a meta-layer: instead of accumulating veCRV directly (which requires locking for years), protocols can bribe vlCVX (locked CVX) holders to direct Convex's gauge weight votes toward their preferred Curve pools. The Curve Wars turned Curve gauge emissions into a market for protocol liquidity bootstrapping: a playbook that inspired the "ve(3,3)" tokenomics model adopted by Solidly, Velodrome, Aerodrome, and numerous other DEXes.
Integrating with Curve Pools Programmatically
Curve provides a Python SDK and smart contract interfaces for programmatic interaction:
Python SDK (curve-contract-api):
pip install curve-api
The Curve API serves pool data at https://api.curve.fi/api/getPools/ethereum/main. It returns all Ethereum main pools with TVL, APY, volume and coin addresses. Use this for market data without on-chain calls.
Direct smart contract interaction:
Each Curve pool has its own contract with standardised interfaces. For 3pool (DAI/USDC/USDT, address 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7):
pool.functions.get_dy(i, j, dx).call() returns the expected output for input amount dx of token index i, receiving token index j. No gas cost (view function). Token indices: 0=DAI, 1=USDC, 2=USDT.
pool.functions.exchange(i, j, dx, min_dy).transact() executes the swap. min_dy is your slippage-protected minimum output (set to get_dy()*0.999 for 0.1% slippage tolerance).
For TriCrypto pools (ETH/BTC/USDT, Curve V2):
Curve V2 pools use a different invariant optimised for volatile assets, with a different ABI. Use get_dy_underlying() for stableswap pools and get_dy() for V2 pools. Curve's brownie scripts repository on GitHub has reference implementations for all pool interaction patterns.
How arbitrage keeps Curve in line: Other traders watch Curve pool prices against Uniswap/CEX prices. If 3pool's USDC/USDT rate diverges from 1:1 by more than gas + Curve fee (0.04%), a profitable arbitrage exists. They flash loan the discrepant stablecoin from Aave, swap through Curve, repay, and keep the spread. That classic DeFi arbitrage is what keeps Curve's prices aligned with broader market rates.
Who Curve Is Best For
Curve suits: stablecoin holders who want yield from LP fees with minimal impermanent loss risk (stablecoins don't diverge much in value, so IL is typically <0.1% annually); DeFi protocols that need to establish deep stablecoin or pegged-asset liquidity for their own tokens via gauge weight strategy; arbitrageurs maintaining stablecoin price alignment across DEXes; and yield-seekers who understand the Convex/veCRV ecosystem and want to maximise CRV-boosted returns. Curve isn't built for volatile asset trading, so use Uniswap or Camelot for that.
Curve Wars and veCRV Governance
The Curve Wars refers to the competition between DeFi protocols to accumulate veCRV (vote-escrowed CRV) to direct CRV emissions toward their preferred liquidity pools. CRV emissions attract liquidity providers, so controlling where emissions go effectively controls where liquidity gathers. Protocols like Convex Finance built entire platforms (cvxCRV, vlCVX) to pool veCRV voting power on behalf of depositors. Convex's dominance in the Curve Wars means it effectively controls a large portion of CRV gauge votes, creating a meta-layer of DeFi governance built on top of Curve's incentive mechanics.
crvUSD is Curve's native overcollateralized stablecoin featuring the LLAMMA (Lending-Liquidating AMM Algorithm) mechanism. This soft liquidation system converts collateral to crvUSD gradually as price falls, which spares borrowers the harm of abrupt hard liquidations. This soft liquidation design is more user-friendly than standard CDP protocols during volatile market conditions. Curve V2 pools support volatile asset pairs (not just stablecoins) using an internal price oracle that adjusts the concentrated liquidity range automatically, competing with Uniswap V3 concentrated liquidity for non-pegged assets. Other major DEXs to compare include Balancer, SushiSwap, and PancakeSwap. Use our crypto tools and DennTech blog for Curve DeFi analysis.