{
  "$schema": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "schemaVersion": "1.0.0",
  "id": "automated-market-makers",
  "canonical": "https://degreesofsatoshi.com/encyclopedia/automated-market-makers/",
  "collection": "defi",
  "title": "Automated market makers: trading against a programmed inventory",
  "description": "Learn how an automated market maker exchanges pooled inventory, how its curve changes a quote, and why arbitrage and liquidity providers matter.",
  "aliases": [
    "AMM"
  ],
  "dates": {
    "published": "2026-10-02",
    "modified": "2026-10-02",
    "verified": "2026-10-02T15:08:18.373Z",
    "dataAsOf": null
  },
  "authorship": {
    "publisher": "Degrees of Satoshi editorial project",
    "process": "AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied."
  },
  "quickAnswer": {
    "text": "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.",
    "claimId": "automated-market-makers-quick-answer",
    "sourceIds": [
      "pair",
      "v3"
    ]
  },
  "keyFacts": [
    {
      "label": "Inventory",
      "value": "Swaps change the quantities of the two tokens in a v2 pair.",
      "sourceIds": [
        "pair"
      ],
      "id": "inventory",
      "claimId": "automated-market-makers-fact-inventory"
    },
    {
      "label": "Price",
      "value": "The next quote depends on the new reserve balances.",
      "sourceIds": [
        "pricing"
      ],
      "id": "price",
      "claimId": "automated-market-makers-fact-price"
    },
    {
      "label": "Variation",
      "value": "Uniswap v3 concentrates liquidity inside chosen ranges.",
      "sourceIds": [
        "v3"
      ],
      "id": "variation",
      "claimId": "automated-market-makers-fact-variation"
    }
  ],
  "prerequisites": [
    "decentralized-exchanges"
  ],
  "sections": [
    {
      "id": "inventory",
      "heading": "The pool is the counterparty inventory",
      "paragraphs": [
        "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."
      ],
      "sourceIds": [
        "pair"
      ]
    },
    {
      "id": "curve",
      "heading": "A curve describes a trade-off",
      "paragraphs": [
        "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."
      ],
      "sourceIds": [
        "pair",
        "pricing"
      ]
    },
    {
      "id": "external-market",
      "heading": "How the pool relates to outside prices",
      "paragraphs": [
        "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."
      ],
      "sourceIds": [
        "pricing",
        "v3"
      ]
    }
  ],
  "faq": [
    {
      "question": "Does an AMM guarantee that every trade is possible?",
      "answer": "No. Available liquidity, allowed tokens, contract checks and the trader’s limits constrain execution. Concentrated pools can have price ranges with no active liquidity.",
      "sourceIds": [
        "v3",
        "pair"
      ]
    }
  ],
  "claims": [
    {
      "id": "automated-market-makers-quick-answer",
      "articleSlug": "automated-market-makers",
      "statement": "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.",
      "sourceIds": [
        "source-5651ae58cdcb25c2",
        "source-f5705afc81647349"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-5651ae58cdcb25c2",
          "locator": "mint; burn; swap; _mintFee"
        },
        {
          "sourceId": "source-f5705afc81647349",
          "locator": "Concentrated Liquidity; Active Liquidity; Non-Fungible Liquidity"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read v2 swap balance checks, reserve-based pricing, and the v3 announcement’s concentrated/active-liquidity sections. The QA identifies constant product as one model rather than a universal AMM formula.",
          "Recomputed the fee-free 100 A / 1,000 B / 10 A example: output 90.909090… B. The limitations on execution and inactive ranges match the cited mechanisms."
        ]
      }
    },
    {
      "id": "automated-market-makers-fact-inventory",
      "articleSlug": "automated-market-makers",
      "statement": "Inventory: Swaps change the quantities of the two tokens in a v2 pair.",
      "sourceIds": [
        "source-5651ae58cdcb25c2"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-5651ae58cdcb25c2",
          "locator": "mint; burn; swap; _mintFee"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read v2 swap balance checks, reserve-based pricing, and the v3 announcement’s concentrated/active-liquidity sections. The QA identifies constant product as one model rather than a universal AMM formula.",
          "Recomputed the fee-free 100 A / 1,000 B / 10 A example: output 90.909090… B. The limitations on execution and inactive ranges match the cited mechanisms."
        ]
      }
    },
    {
      "id": "automated-market-makers-fact-price",
      "articleSlug": "automated-market-makers",
      "statement": "Price: The next quote depends on the new reserve balances.",
      "sourceIds": [
        "source-5cf943a6c62eb740"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-5cf943a6c62eb740",
          "locator": "Pricing Trades; Exact Input; Exact Output"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read v2 swap balance checks, reserve-based pricing, and the v3 announcement’s concentrated/active-liquidity sections. The QA identifies constant product as one model rather than a universal AMM formula.",
          "Recomputed the fee-free 100 A / 1,000 B / 10 A example: output 90.909090… B. The limitations on execution and inactive ranges match the cited mechanisms."
        ]
      }
    },
    {
      "id": "automated-market-makers-fact-variation",
      "articleSlug": "automated-market-makers",
      "statement": "Variation: Uniswap v3 concentrates liquidity inside chosen ranges.",
      "sourceIds": [
        "source-f5705afc81647349"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-f5705afc81647349",
          "locator": "Concentrated Liquidity; Active Liquidity; Non-Fungible Liquidity"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": null,
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T15:08:18.373Z",
        "reviewer": "automated independent verification",
        "notes": [
          "Read v2 swap balance checks, reserve-based pricing, and the v3 announcement’s concentrated/active-liquidity sections. The QA identifies constant product as one model rather than a universal AMM formula.",
          "Recomputed the fee-free 100 A / 1,000 B / 10 A example: output 90.909090… B. The limitations on execution and inactive ranges match the cited mechanisms."
        ]
      }
    }
  ],
  "sources": [
    {
      "id": "pair",
      "label": "Uniswap v2 pair source",
      "publisher": "Uniswap",
      "url": "https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol",
      "locator": "mint; burn; swap; _mintFee",
      "note": "Reserve accounting, LP shares, fee-adjusted invariant and optional protocol fee.",
      "version": "v2-core v1.0.1",
      "checkedAt": "2026-10-02",
      "recordId": "source-5651ae58cdcb25c2",
      "contentSha256": null
    },
    {
      "id": "v3",
      "label": "Introducing Uniswap v3",
      "publisher": "Uniswap Labs",
      "url": "https://blog.uniswap.org/uniswap-v3",
      "locator": "Concentrated Liquidity; Active Liquidity; Non-Fungible Liquidity",
      "note": "Range-based liquidity, inactive positions and position-specific accounting.",
      "version": "2021-03-23 announcement",
      "checkedAt": "2026-10-02",
      "recordId": "source-f5705afc81647349",
      "contentSha256": null
    },
    {
      "id": "pricing",
      "label": "Uniswap v2 pricing",
      "publisher": "Uniswap",
      "url": "https://developers.uniswap.org/docs/protocols/v2/concepts/pricing",
      "locator": "Pricing Trades; Exact Input; Exact Output",
      "note": "Reserve-dependent quotes, trade bounds and external price observations.",
      "version": "Uniswap v2",
      "checkedAt": "2026-10-02",
      "recordId": "source-5cf943a6c62eb740",
      "contentSha256": null
    }
  ],
  "related": {
    "articles": [
      "constant-product-pools",
      "liquidity-pools",
      "concentrated-liquidity"
    ],
    "dossiers": [],
    "wallets": []
  },
  "revisionHistory": [
    {
      "date": "2026-10-02",
      "kind": "published",
      "summary": "First publication after primary-source research and independent automated verification."
    }
  ],
  "citation": "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/"
}
