# Automated market makers: trading against a programmed inventory

An automated market maker, or AMM, quotes exchanges using a programmed rule and available inventory. Liquidity providers supply that inventory. A constant-product pool is one AMM design; concentrated ranges and other curves behave differently, so “AMM” does not identify a single pricing formula.

Evidence: [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol); [Introducing Uniswap v3](https://blog.uniswap.org/uniswap-v3)

Canonical: https://degreesofsatoshi.com/encyclopedia/automated-market-makers/
Published: 2026-10-02
Substantively modified: 2026-10-02
Independently verified by an automated reviewer: 2026-10-02T15:08:18.373Z

AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied.

## Key facts

- **Inventory:** Swaps change the quantities of the two tokens in a v2 pair. ([Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol))
- **Price:** The next quote depends on the new reserve balances. ([Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing))
- **Variation:** Uniswap v3 concentrates liquidity inside chosen ranges. ([Introducing Uniswap v3](https://blog.uniswap.org/uniswap-v3))

## The pool is the counterparty inventory

In a two-token AMM, buyers do not need a particular seller’s matching order at the moment of a swap. A contract exchanges against inventory deposited earlier. The rule limits how much of one token can leave for a given amount of the other.

Liquidity providers own claims on the resulting inventory. They do not simply lend unchanged piles of both assets: trading changes the composition of what their claims represent.

Evidence: [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol)

## A curve describes a trade-off

For a fee-free constant-product pool, x times y stays constant during a swap. If reserves begin at 100 A and 1,000 B, adding 10 A leaves 110 A and about 909.091 B, so the output is about 90.909 B. The starting reserve ratio of 10 B per A would have implied 100 B if the whole trade could happen at that marginal rate.

This difference follows from consuming inventory along the curve. A larger pool at the same starting ratio moves less for the same input. The calculation is an idealized illustration, not a quote from a live market.

Evidence: [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol); [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing)

## How the pool relates to outside prices

A pool’s balances do not automatically know an external market price. Traders who can buy on one venue and sell on another can move pool prices toward outside prices. Fees, costs and execution risk can leave differences.

Other AMM rules allocate liquidity differently. A v3 position supplies a price interval and stops participating once the price is outside that interval. Apply the formula for the actual version instead of treating every pool as the full-range example.

Evidence: [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing); [Introducing Uniswap v3](https://blog.uniswap.org/uniswap-v3)

## Questions

### Does an AMM guarantee that every trade is possible?

No. Available liquidity, allowed tokens, contract checks and the trader’s limits constrain execution. Concentrated pools can have price ranges with no active liquidity.

Evidence: [Introducing Uniswap v3](https://blog.uniswap.org/uniswap-v3); [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol)

## Claims and scope

### automated-market-makers-quick-answer

An automated market maker, or AMM, quotes exchanges using a programmed rule and available inventory. Liquidity providers supply that inventory. A constant-product pool is one AMM design; concentrated ranges and other curves behave differently, so “AMM” does not identify a single pricing formula.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

### automated-market-makers-fact-inventory

Inventory: Swaps change the quantities of the two tokens in a v2 pair.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

### automated-market-makers-fact-price

Price: The next quote depends on the new reserve balances.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

### automated-market-makers-fact-variation

Variation: Uniswap v3 concentrates liquidity inside chosen ranges.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

## Sources

- [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol) — Uniswap. Reserve accounting, LP shares, fee-adjusted invariant and optional protocol fee. Locator: mint; burn; swap; _mintFee. Retrieved: 2026-10-02.
- [Introducing Uniswap v3](https://blog.uniswap.org/uniswap-v3) — Uniswap Labs. Range-based liquidity, inactive positions and position-specific accounting. Locator: Concentrated Liquidity; Active Liquidity; Non-Fungible Liquidity. Retrieved: 2026-10-02.
- [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing) — Uniswap. Reserve-dependent quotes, trade bounds and external price observations. Locator: Pricing Trades; Exact Input; Exact Output. Retrieved: 2026-10-02.

## Revision history

- 2026-10-02: First publication after primary-source research and independent automated verification.

## Cite this entry

Degrees of Satoshi editorial project. “Automated market makers: trading against a programmed inventory.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/automated-market-makers/
