Skip to content

LibraryMarkets2020Design paperCorpus record

Uniswap v2 Core

Uniswap. Hayden Adams, Noah Zinsmeister, Dan Robinson.

The 2020 core paper for Uniswap v2: a constant-product automated market maker, with arbitrary ERC-20 pairs, price accumulators, and a flash-swap callback. It is the clearest short specification of the pool that much of later DeFi either forked or assumed.

Uniswap v2 prices a pair with a constant product: the pool multiplies its two reserves and refuses any trade that would shrink that product, before the fee.
Evidence
Primary paper
Re-measured
No
Assumptions
4
Records linked
6

Code

Source, repository, and what is actually hosted

  • Uniswap v2 core paperhttps://uniswap.org/whitepaper.pdf
  • The source URL is not a GitHub repository. No code remote is invented.
  • Full text is not mirrored. Public availability is not a licence to copy the file onto this site.
  • Add to a reading list

01 Claim ledger

What the paper is allowed to say

Each row is a sentence already in the study. The status is the same on every row: a model claim, not a live measurement.

  1. Claim 01 · Paper model

    Anyone can pool two tokens

    There is no order book and no listing committee. Liquidity providers deposit both assets and receive a claim on the pool.

  2. Claim 02 · Paper model

    The price is the ratio of reserves

    A trader sends one asset in and receives the other out, leaving the product of the reserves no smaller than before, plus a fee that stays in the pool.

  3. Claim 03 · Paper model

    The fee is how liquidity is paid

    The paper's 0.30 percent is not a toll to a company. It accrues to the reserves, so the liquidity token becomes a claim on a slightly larger pool.

  4. Claim 04 · Paper model

    Flash swaps appear here

    A caller may withdraw and repay inside one transaction, or fail the whole transaction. The paper makes the pool a primitive other contracts can compose, which is also how it can be attacked.

  5. Claim 05 · Paper model

    Price oracles are a side effect

    The paper adds a time-weighted price accumulator so other contracts can read a manipulated-resistant average. A spot price at the end of one block is not that oracle.

02 Three cuts

Observation, model, falsifier

A desk does not stop at the summary. Each claim is cut three ways, using only this study's own assumptions and checks. Nothing here is a new figure.

  1. 01 Anyone can pool two tokens

    Observation

    What the study says

    There is no order book and no listing committee. Liquidity providers deposit both assets and receive a claim on the pool.

    Model

    What has to hold

    Both tokens are standard and do not take a fee on transfer or rebase balances. Weird tokens break the reserve accounting.

    Falsifier

    What would retire it

    What happens if one of the tokens charges a transfer fee?

  2. 02 The price is the ratio of reserves

    Observation

    What the study says

    A trader sends one asset in and receives the other out, leaving the product of the reserves no smaller than before, plus a fee that stays in the pool.

    Model

    What has to hold

    Arbitrageurs can trade when the pool price drifts from other markets. Without them the invariant does not track a fair price.

    Falsifier

    What would retire it

    Is any other contract reading the spot reserves as an oracle?

  3. 03 The fee is how liquidity is paid

    Observation

    What the study says

    The paper's 0.30 percent is not a toll to a company. It accrues to the reserves, so the liquidity token becomes a claim on a slightly larger pool.

    Model

    What has to hold

    The time-weighted oracle is used by anyone who needs a price. The spot reserves are not a price feed.

    Falsifier

    What would retire it

    Who receives the fee, and is it the paper's 0.30 percent or a later setting?

  4. 04 Flash swaps appear here

    Observation

    What the study says

    A caller may withdraw and repay inside one transaction, or fail the whole transaction. The paper makes the pool a primitive other contracts can compose, which is also how it can be attacked.

    Model

    What has to hold

    Arbitrageurs can trade when the pool price drifts from other markets. Without them the invariant does not track a fair price.

    Falsifier

    What would retire it

    Does the quoted price cover the whole curve or a concentrated range?

  5. 05 Price oracles are a side effect

    Observation

    What the study says

    The paper adds a time-weighted price accumulator so other contracts can read a manipulated-resistant average. A spot price at the end of one block is not that oracle.

    Model

    What has to hold

    The time-weighted oracle is used by anyone who needs a price. The spot reserves are not a price feed.

    Falsifier

    What would retire it

    Is any other contract reading the spot reserves as an oracle?

03 Sequence

One action, as an operating tape

  1. 01A liquidity provider deposits both tokens in the current ratio and receives pool tokens.
  2. 02A trader sends token A. The contract computes how much token B leaves so that the product of reserves does not fall, ignoring the fee that is kept.
  3. 03Reserves update. The implicit price, A per B, moves.
  4. 04If the trader is using a flash swap, they must pay the pool back before the transaction ends, or the call reverts.
  5. 05When the provider withdraws, they burn pool tokens and receive their share of both reserves, fees included, and losses included.

04 Load-bearing

The argument, and where a pitch drops it

  1. The invariant is the whole market maker

    The cut

    Constant product means large trades move the price a lot, and the pool never runs out of either asset in theory: the price goes to an extreme instead. That is a design for long-tail pairs, not a design that mimics a deep order book at one price.

    Why it carries weight

    If this cut is skipped, the paper's name is being used without the mechanism that makes the name mean anything.

    Where it is dropped

    The invariant is not a promise of a good price. It is a function of reserves.

  2. Liquidity providers are short volatility

    The cut

    If the outside price moves and arbitrageurs rebalance the pool, the provider ends with more of the falling asset. The fee is the compensation the paper offers. It does not promise the fee will be enough. Impermanent loss is this arithmetic, not a moral failure of the provider.

    Why it carries weight

    If this cut is skipped, the paper's name is being used without the mechanism that makes the name mean anything.

    Where it is dropped

    The invariant is not a promise of a good price. It is a function of reserves.

  3. Composability includes the attacker

    The cut

    A flash swap that must repay inside the transaction is safe for the pool's accounting and unsafe for any other contract that trusts a spot price the swap just moved. The paper's oracle section exists because the spot price is a toy.

    Why it carries weight

    If this cut is skipped, the paper's name is being used without the mechanism that makes the name mean anything.

    Where it is dropped

    The invariant is not a promise of a good price. It is a function of reserves.

05 Register

What has to be true

  • Model · Not re-measured

    Both tokens are standard and do not take a fee on transfer or rebase balances. Weird tokens break the reserve accounting.

  • Model · Not re-measured

    Arbitrageurs can trade when the pool price drifts from other markets. Without them the invariant does not track a fair price.

  • Model · Not re-measured

    Users set a minimum output. The contract will happily trade at a ruined price if the caller does not constrain it.

  • Model · Not re-measured

    The time-weighted oracle is used by anyone who needs a price. The spot reserves are not a price feed.

06 Divergence

What happened after the paper

Uniswap v2 became the reference pool on Ethereum and was followed by v3's concentrated liquidity, which changes the invariant from 'the whole price range' to 'a chosen interval'. Read v2 for the constant product and the oracle accumulator. Do not describe a v3 position as if it were this paper.

A later client, parameter set, or reward formula is a different object. Cite this paper for the mechanism. Cite a primary release for the network. This desk has not re-run the proof.

07 Pre-mortem

What to check before you use the idea

  1. 0 of 4 marked on this browser. A mark is a reading note, not a pass, a rating, or a recommendation.

08 Anatomy

The paper, in the order a builder needs

The problem it names

Order books need makers who stay online. Uniswap's design lets a pool of two tokens quote a price from its own reserves, so a trader can swap against the contract without a counterparty sitting in the book.

What the design proposes

  • The invariant is the product of the two reserves, up to the fee. A trade moves the reserves along that curve.
  • Anyone may add liquidity in proportion to the reserves and receive a claim on the pool.
  • A cumulative price is stored so other contracts can read a time-weighted average without trusting the spot price.

How the mechanism is specified

  • The fee stays in the pool. Liquidity providers earn it only by being in the pool while volume happens, and they eat divergence loss when the price moves.
  • Flash swaps let a user receive tokens and pay inside the same transaction, or revert.
  • The core contracts are not the router, the interface, or the later v3 concentrated-liquidity paper.

What this page does not treat as proven

  • The invariant is not a promise of a good price. It is a function of reserves.
  • Divergence loss is not a bug in the paper. It is the cost of the curve.
  • This page does not describe governance, the UNI token, or v3. Those are separate.

Why the desk still reads it

Any venture that says 'AMM' should be able to write its invariant on one line and say who loses when the external price moves. Uniswap v2 is that line.

09 Lexicon

Terms, opened into the record

Constant product
The rule that the two reserves, multiplied, do not fall when someone trades.
Pool token
A claim on a share of both reserves, including fees and including any inventory loss.
Flash swap
A withdrawal that must be repaid before the transaction ends, or the transaction reverts.
Time-weighted price
An average of the pool's price over time, harder to push inside a single block than the spot ratio.

10 Repository

Every linked record on this page

Underlined words open a page that already exists: a concept, a protocol profile, a failure record, or another paper. If a word is not underlined, this desk does not have a record for it.

This is Blockchain Lab's reading of a public design paper. It is not the paper, not a copy of it, and not an offer of tokens, equity, custody or a partnership. Later network behaviour can diverge from the text. Nothing here is investment, legal or technical advice.

Research status: Design paper. Last reviewed: 1 October 2026. This is a reading of a public paper, not investment, legal or security advice.