---
title: "Automated Market Maker (AMM) — definition | Nuri Glossary"
description: "A contract that quotes prices from a formula and pooled liquidity instead of matching buyers with sellers in an order book."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/amm"
---

# Automated Market Maker (AMM)

A contract that quotes prices from a formula and pooled liquidity instead of matching buyers with sellers in an order book.

## Basically

An automated market maker lets you swap one token for another without a traditional exchange. It uses pooled tokens and a set mathematical rule to set the price.

## Key Takeaways

- An automated market maker (AMM) replaces traditional order books with smart contracts that hold token reserves and price trades algorithmically. You can trade without permission on decentralised exchanges.
- The constant product formula, x * y = k, keeps liquidity available at any price point. Impermanent loss means liquidity providers can underperform simple buy-and-hold strategies when prices diverge.
- AMM designs have evolved from Uniswap V1's basic pools in 2018 to concentrated liquidity in 2021 and hook-based architectures in 2025. Their relevance is growing for stablecoin trading and Bitcoin DeFi.

## What Is an Automated Market Maker?

An automated market maker (AMM) is a type of decentralised exchange protocol. It uses mathematical formulas and trustless smart contracts to set asset prices and execute trades. Instead of matching buyers and sellers through an order book, as centralised exchanges do, an AMM lets you trade directly against tokens locked in a smart contract.
Vitalik Buterin proposed an on-chain automated market maker in 2016. Bancor Protocol launched the first implementation in June 2017, and Uniswap V1 popularised the model on Ethereum in November 2018. AMMs are now the dominant trading mechanism in decentralised finance, with Uniswap alone having processed over $3.4 trillion in cumulative trading volume.
Anyone can become a liquidity provider by depositing tokens into a pool. You earn a share of trading fees in proportion to your contribution. The system is open and permissionless, replacing professional market makers in traditional finance.

## How It Works

An AMM holds a pool of two or more tokens inside a smart contract. A mathematical formula links the token reserves and sets the price for each trade. The constant product function is the most widely used formula.

## The Constant Product Formula

The constant product formula is used by Uniswap V1 and V2. It is written as x * y = k.
The contract calculates how much Token B to release when you deposit Token A into the pool. It keeps the product of the two reserves equal to k. The effective price is the ratio of reserves, y / x, and shifts with every trade.
A pool with 10 ETH and 10,000 USDC has k = 100,000, so depositing 1 ETH might lead you to expect 1,000 USDC at the current ratio. The pool must keep k = 100,000 with 11 ETH, leaving y = 100,000 / 11 = 9,091 USDC, which means you receive approximately 909 USDC. The difference between the expected and actual amount is called slippage, and it increases with larger trades relative to pool size.

## Liquidity Providers

Liquidity providers (LPs) deposit equal values of both tokens into the pool and receive LP tokens for their proportional share. Each swap has a fee, typically 0.3% on Uniswap V2, which is deducted from the trade and added to the pool reserves. You can redeem your LP tokens at any time for the underlying assets plus your accumulated share of fees.

## AMM Variants

AMM designs vary. Each design optimises for a different use case.
Curve Finance's StableSwap invariant is particularly important for stablecoin trading. Near the equilibrium price, its curve behaves like a constant-sum function with near-zero slippage for like-valued assets, then moves towards constant-product behaviour as imbalance grows to prevent pool drainage. An amplification coefficient controls the sensitivity of this transition, and this design has made Curve the dominant venue for large stablecoin swaps, with over $1.7 billion in total value locked.
Uniswap V3's concentrated liquidity lets LPs allocate capital to specific price ranges instead of spreading it from zero to infinity. Within a chosen range, the position acts like a much deeper pool and can achieve up to 4,000x capital efficiency improvement for tightly pegged pairs. The trade-off is that you earn zero fees when the price moves outside your selected range.

## The Evolution of AMMs

Uniswap V4 launched in January 2025 and marks a major architectural shift. Its hook system lets developers attach custom logic to pool events, including swaps, liquidity changes and donations, enabling dynamic fees, on-chain limit orders and automated LP strategies. Its singleton contract design stores all pools in one contract, reducing pool creation gas costs by approximately 99%.

## Stablecoin Trading

AMMs underpin on-chain stablecoin markets, and Curve's StableSwap pools let you swap millions of dollars between stablecoins such as USDC, USDT and DAI with minimal slippage. Stablecoin arbitrage relies on this liquidity, with traders helping maintain pegs by exploiting small price differences across venues. The stablecoin peg mechanisms comparison explains how different stablecoins maintain their pegs.

## Decentralised Token Exchanges

AMMs let anyone trade any token pair without permission or a centralised intermediary. Anyone can create a pool for a new token, giving it instant market access. The model is especially useful for long-tail assets that would never get listed on centralised exchanges.

## Cross-Chain and Bitcoin DeFi

Protocols such as THORChain use AMM mechanics for native cross-chain swaps, so you can trade BTC for ETH or other assets without wrapping or bridging. AMMs on Bitcoin Layer 2 networks are expanding Bitcoin's programmability beyond simple transfers. The Bitcoin Layer 2 comparison explains how solutions such as Spark extend Bitcoin's capabilities, while the growth of stablecoins on Bitcoin is creating new demand for AMM-style liquidity on Bitcoin-native infrastructure.

## Yield Generation

LPs earn trading fees in proportion to their share of the pool, and annualised returns from fees alone can be substantial in high-volume pools. Many protocols add token incentives on top of trading fees, although these reward structures carry their own risks. AMM fee-based yield differs from stablecoin yield strategies, which typically derive returns from lending or treasury backing rather than trading activity.

## Price Discovery

AMM pool ratios serve as on-chain price references, and protocols use time-weighted average prices (TWAPs) derived from these pools as oracle feeds. Uniswap V2 introduced built-in TWAP oracles, and V3 improved their granularity. AMM-derived prices also introduce oracle manipulation risks, particularly for pools with shallow liquidity.

## Impermanent Loss

Impermanent loss is the most fundamental risk for LPs. A changing price ratio between your deposited tokens makes the AMM rebalance your position by effectively selling the appreciating asset and buying the depreciating one. Your position can then be worth less than if you had simply held the tokens.
The loss is called "impermanent" because it reverses if prices return to their original ratio. If you withdraw at a new price ratio, the loss becomes permanent. Trading fees may or may not offset impermanent loss, depending on volume relative to volatility, and concentrated liquidity positions amplify both fee earnings and impermanent loss.

## Smart Contract Risk

AMM pools hold user funds in smart contracts, so bugs, reentrancy vulnerabilities or unaudited code can lead to total loss of pooled assets. Even well-established protocols are not immune, as Balancer suffered a security exploit in November 2025 that contributed to the closure of Balancer Labs in March 2026. Uniswap V4 underwent nine independent audits before launch, reflecting the high stakes of securing AMM contracts.

## Front-Running and MEV

AMM trades are visible in the mempool before confirmation, making them vulnerable to front-running and sandwich attacks. In a sandwich attack, a bot detects a pending swap, places a buy order before it and a sell order after it, then profits from the price impact. Over $550 million is extracted annually from Ethereum users via maximal extractable value (MEV) as of 2026, with mitigations including private transaction channels, MEV-aware routing services and strict slippage limits.

## Oracle Manipulation

Protocols that derive prices from AMM pool ratios are vulnerable to flash loan attacks that temporarily distort reserves. An attacker can borrow a large amount, manipulate a pool's price ratio, exploit a dependent protocol and repay the loan in a single transaction. Time-weighted average prices (TWAPs) averaged over 30+ minutes mitigate this, but shallow pools remain susceptible to sustained oracle manipulation.

## Pool Drainage and Rug Pulls

AMM pool creation is permissionless, so malicious actors can create pools with worthless tokens, attract liquidity and drain value by selling their holdings or exploiting token contract backdoors. You should verify token contracts and pool depth before swapping, especially for newly created pairs.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
