An automated market maker, or AMM, offers trades against pooled assets using an algorithm. In decentralised finance, a smart contract can hold the pool and execute its pricing rules. Uniswap is one implementation; AMM describes a class of market mechanisms rather than a particular exchange or token.1
Pools and pricesReport an errorSuggest an improvement
The constant-product design used by Uniswap v2 relates two token reserves
through an invariant commonly written as x × y = k. Swaps add one asset
and remove the other, moving the quoted price as the reserve ratio
changes. Fees mean the product need not remain literally unchanged across
a completed trade.2
Arbitrage traders buy where an asset is cheaper and sell where it is more expensive. Their trades help align an AMM's price with other markets. This is different from the contract receiving an authoritative external price: the pool's immediately observable price can itself be manipulated. The Uniswap v2 design therefore includes a mechanism for constructing time-weighted price observations.2
Different liquidity curvesReport an errorSuggest an improvement
Curve's 2019 StableSwap paper describes a design intended for assets with similar prices. Near a balanced pool it behaves more like a constant-sum market, allowing trades with relatively little price movement. As reserves become imbalanced, it moves toward constant-product behaviour. The curve can improve trading around the expected exchange rate, but its equations also allow the market price to move away from that rate.3
Uniswap v3 introduced concentrated liquidity, allowing an LP to choose a price interval for a position. Within that interval, a given deposit can support more trading depth than if spread across all prices. Outside it, the position becomes entirely one of its two assets and stops earning trading fees until the price re-enters the interval.1
Uniswap v4 adds hooks: external contracts that can customise behaviour around swaps, liquidity changes, and fees. Its documentation describes a shared pool-management contract and flash accounting that defers token transfers until the end of a transaction. AMM implementations therefore differ in more than their basic pricing curves.4
Returns and risksReport an errorSuggest an improvement
An LP's inventory changes as others trade. The resulting position can be worth less than simply holding the original tokens, a difference commonly called impermanent loss. Closing the position can realise that difference; the word “impermanent” is not a promise that the loss will disappear. Trading fees may offset losses, but do not guarantee that they will.56
For traders, transaction ordering is another risk. A sandwich strategy places transactions before and after a victim's swap, exploiting the price movement and leaving the victim with worse execution. AMM trading is consequently connected to maximal extractable value, as well as to liquidity and pricing.7
See alsoReport an errorSuggest an improvement
ReferencesReport an errorSuggest an improvement
-
^ a b Adams, H. et al. (2021). Uniswap v3 Core. https://app.uniswap.org/whitepaper-v3.pdf
-
^ a b Adams, H., Zinsmeister, N., and Robinson, D. (2020). Uniswap v2 Core. https://app.uniswap.org/whitepaper.pdf
-
^ Egorov, M. (2019). StableSwap — efficient mechanism for Stablecoin liquidity. https://curve.fi/files/stableswap-paper.pdf
-
^ Uniswap developer documentation. Uniswap Protocols Overview. https://developers.uniswap.org/docs/protocols/overview
-
^ Uniswap Labs. What is Impermanent Loss? https://support.uniswap.org/hc/en-us/articles/20904453751693-What-is-Impermanent-Loss
-
^ Uniswap Labs (2025-09-22). Understanding Liquidity Provision in DeFi. https://blog.uniswap.org/how-liquidity-provision-in-defi-works
-
^ ethereum.org. Maximal extractable value (MEV). https://ethereum.org/en/developers/docs/mev/