The encyclopedia · Software & IT · Technical decision · 2018–2020
Uniswap replaced order books with one constant-product formula that prices any pair
Uniswap lets anyone trade tokens against pooled reserves: one equation sets the price, so there is no order book to staff or quotes to solicit.
Uniswap
the move
In 2018 Hayden Adams deployed Uniswap v1 on Ethereum, a decentralized exchange with no order book: each pair is a smart contract holding two token reserves, and trades follow the constant-product curve x·y=k, so the pool itself quotes the price.
The alternative was a traditional exchange — match bids and asks, manage an order book, recruit market makers. Uniswap instead lets anyone deposit both tokens and earn a 30-basis-point fee on every trade; price adjusts mechanically as reserves change, and even a brand-new token can be traded the moment a pair exists.
The 2020 v2 whitepaper documents the refinements — arbitrary ERC-20 pairs, a time-weighted price oracle, flash swaps — all built on the same invariant. Academic analysis later showed the design's properties, such as splitting a trade not changing the final rate, which made the model the template for a generation of decentralized exchanges.
why it works
- No order book means no market makers to recruit.
- The invariant guarantees a trade is always possible.
- Fees pay anyone who deposits reserves, crowdsourcing liquidity.
- Price moves smoothly with pool depth rather than quotes.
what transfers
Don't build a matching engine and court market makers; fix one rule that lets the crowd supply liquidity, and the protocol's only job is enforcing the invariant.
what came after
The constant-product AMM became the template for decentralized finance: later protocols such as Balancer and Curve were introduced as variations, Uniswap's design spread across other blockchains, and the protocol's v2 and v3 contracts still anchor on-chain trading years later.
references
spotted an error? The archive wants to know.