Blog / DeFi and Web3

Automated Market Makers Explained: Uniswap and Curve

Cointechies

Traditional markets match buyers and sellers through an order book. Automated market makers, or AMMs, do something simpler: they let people trade against a pool of tokens, with a formula setting the price. This idea powers Uniswap, Curve and most decentralised exchanges.

The market maker, replaced by a formula

A market maker is someone who always stands ready to buy and sell, earning a spread. An AMM automates this role. The pool is always open, and anyone can deposit tokens to fund it.

The constant product formula

Uniswap’s classic design, introduced in 2018, keeps the product of two token amounts constant: x multiplied by y equals k. If a pool holds 100 ETH and 200,000 stablecoins, k is 20 million. When a trader buys ETH, the ETH amount falls, so the stablecoin amount must rise to keep k the same, which pushes the price up.

The curve is smooth, so there is always a price, however large the trade, although big trades face steep price impact.

Line chart of the constant product curve where B falls as A rises
As you take token A out of the pool, the amount of B you must add climbs steeply, so the price rises.

Uniswap in practice

Anyone can create a pool for a token pair. Later versions let liquidity providers concentrate their funds in a chosen price range, which makes capital more efficient but needs active management. Providers earn a fee on every swap in their range.

Curve: built for similar assets

Curve is designed for tokens that should trade near the same price, such as different dollar stablecoins. It uses a flatter formula that keeps the price very close to one-for-one across large trades, so swaps between stablecoins have much less slippage than on a constant product pool.

What liquidity providers earn and risk

Providers earn fees, and sometimes extra token rewards. The main risk is impermanent loss: if the price of one token moves a lot compared with the other, the provider’s pool share can be worth less than simply holding the tokens. Fees may or may not compensate for it.

AMMs versus order books

  • AMM: always available, simple, open to anyone, but slippage on big trades.
  • Order book: can offer tighter prices and advanced orders, but needs active market makers.

Some newer DEXs mix the two approaches.

The bottom line

AMMs showed that a market can run on a formula and community-supplied liquidity. Uniswap suits general token pairs, Curve suits tokens of similar value, and both opened trading to anyone with a wallet.

This article is for educational purposes only and is not financial advice. Providing liquidity carries risks including impermanent loss. Crypto assets are volatile and you can lose some or all of your investment.

Follow the market in real time on the live crypto prices page, or go back to all articles.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

More from the blog

All articles