DEX
Est. 2020 Decentralised (Curve DAO)

Curve Finance

Curve Finance is the dominant stablecoin and pegged-asset DEX on Ethereum — using a specialised AMM formula (StableSwap) that enables near-zero slippage swaps between assets that should trade at the same price, making Curve the infrastructure layer for all major stablecoin liquidity in DeFi with $5B+ TVL.

Curve Finance was created by Michael Egorov and launched in January 2020 with a specific focus: creating a DEX optimised for swapping between assets that should have the same value — primarily 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, enabling $100M+ stablecoin swaps with 0.01–0.04% slippage — impossible with Uniswap's formula 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 maintains a 1:1 exchange rate regardless of trade size — perfect for stablecoins at peg — but breaks down when a pool becomes imbalanced (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 is not transferable — it's purely a governance power representation that decays to zero at the lock expiry. veCRV has two critical powers: Gauge weight votes — 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 — which requires veCRV gauge votes — which requires 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 — 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() — get 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() — execute 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.

Arbitrage bot pattern: Monitor Curve pool prices vs 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. Flash loan the discrepant stablecoin from Aave, swap through Curve, repay, keep the spread — a classic DeFi arbitrage that keeps Curve's prices aligned with broader market rates and generates small but consistent profits for well-optimised bots.

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 is not a suitable venue for volatile asset trading — 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. Since CRV emissions attract liquidity providers, controlling where emissions go effectively controls where liquidity concentrates — protocols like Convex Finance built entire platforms (cvxCRV, vlCVX) to aggregate 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 — a soft liquidation system where collateral is gradually converted to crvUSD as price falls rather than abrupt hard liquidations that harm borrowers. 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.