← Glossary

Trading & DeFi

What Is an Automated Market Maker (AMM)? Trading Without an Order Book

An automated market maker (AMM) is a decentralised exchange design in which trades execute against a pool of tokens whose price is set by a mathematical formula, rather than against an order book of buyers and sellers.

Key takeaways

The basic design

Traditional exchanges match buyers and sellers through an order book. An automated market maker replaces the book with a pool of two tokens held by a smart contract. To trade, you send one token into the pool and receive the other. The pool follows a formula that sets the exchange rate from its current reserves.

Uniswap v2's formula

The Uniswap documentation describes the constant product formula x times y equals k, where x and y are the reserves of each token and k is the invariant that must stay constant or increase after every trade. Buying one token removes it from the pool, which raises its price for the next trader. The pool never runs out of price quotes, but each trade moves the price along a curve.

Who provides liquidity

Anyone can become a liquidity provider by depositing both tokens in the pool. In return, providers earn a share of the fees paid by traders. That makes markets possible for new tokens without a professional market maker, which is a major reason AMMs spread quickly.

Trade-offs

For traders, the price depends on pool size: deep pools handle big trades with little impact, while small pools can be expensive. Trades also face MEV such as sandwich attacks. For liquidity providers, a changing price ratio causes impermanent loss relative to simply holding. Other AMM designs exist with different formulas and concentrated liquidity ranges that aim to use capital more efficiently.

What it means for you

When you swap in a wallet, the route often passes through one or more AMM pools. Check the price impact and the slippage setting, compare quotes and avoid thin pools for larger amounts.

Example

A pool holds 10 ETH and 20,000 USDC. You swap 1 ETH. The pool's formula returns about 1,818 USDC before fees, less than the 2,000 spot rate, because your trade moves the ratio. The pool keeps a small fee that is shared with its liquidity providers.

Put it into practice

Swap through pools from your wallet

Scrypt Wallet routes Solana swaps through Jupiter and Ethereum swaps through Uniswap. Check the quote and price impact before you confirm.

Create a free wallet Get Scrypt for Android

Sources and verification

Last reviewed 2026-10-02 by the Scrypt Wallet team. The factual claims on this page, and where each comes from:

  1. A Uniswap pool prices tokens with a constant product formula x * y = k, where x and y are the reserves and k stays constant or increases after every trade. [1]
  2. Anyone can become a liquidity provider by depositing token pairs into a pool. [1]
  3. An order book records buyers' and sellers' orders and a matching engine fills them, unlike a pool. [2]

Sources

  1. How Uniswap works · Uniswap documentation · primary source
  2. Order book · Wikipedia · secondary source

Primary sources are protocol papers, specifications, source code or a project's own documentation; secondary sources are wikis and explainers. We checked each claim against the source text on the review date. Found an error? Tell us and we will correct it.

Frequently asked questions

Is an AMM the same as a DEX?

An AMM is one design for a decentralised exchange. Some DEXs use order books instead.

Who sets the price on an AMM?

The pool's formula and reserves, kept in line with other markets by arbitrage.

Is providing liquidity profitable?

Sometimes, but fees can be outweighed by impermanent loss and other risks.

Related terms

Go deeper

Written by the Scrypt Wallet team · Updated 2026-10-02. General education, not financial, tax or legal advice.