EN
返回档案库

案例库 · 软件与 IT · 技术决策 · 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

那一手

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.

为什么管用

  • 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.
值了多少Let one invariant price every trade神来之笔

可以搬走什么

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.

后来呢

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.

资料来源

发现哪里写错了?告诉我们。

同一路聪明