Uniswap

A decentralized exchange protocol that uses liquidity pools instead of an order book.

Visit websiteOfficial site: uniswap.org

Facts checked · Decentralized exchanges

Uniswap is a decentralized exchange protocol built on Ethereum. It is an automated market maker, a set of smart contracts that let anyone swap tokens, provide liquidity or create a market onchain. Its documentation describes the protocol as open source and non-upgradeable.

Key facts

Kind
Decentralized exchange
Chains
Ethereum and other networks
Custody
Self-custody
Who it is for
Traders, Liquidity providers
Market structure
Automated market maker, no order book
Pricing
x * y = kSource: How Uniswap Works, Uniswap Developers. As of , verified .In v3 and v4 the formula applies within each liquidity provider's chosen price range.
Contracts
Open source (GPL-licensed) and non-upgradeable
Swap fees
Set per pool and protocol version, paid to liquidity providers

What it is

Uniswap is a decentralized exchange protocol built on Ethereum. It does not match buyers with sellers through an order book. It is an automated market maker: a set of smart contracts that hold pools of tokens and let anyone swap against them, add liquidity to them, or create a new market.

The Uniswap documentation describes the protocol as open source, non-upgradeable and designed for self-custody.

How it works

Liquidity pools. Each pool holds reserves of two ERC-20 tokens. Anyone can become a liquidity provider by depositing tokens into a pool.

Swaps. A trader swaps against the pool’s reserves. The pool prices tokens with a constant product formula, x * y = k, where x and y are the reserve balances and k must stay constant or increase after each trade. A larger trade relative to the pool’s depth moves the price more.

Versions. How a liquidity provider’s share is tracked depends on the version. In v2, the pool mints fungible ERC-20 tokens that represent a proportional share. In v3 and v4, each provider chooses a price range, which is called concentrated liquidity.

Fees. Swap fees are configured by pool and protocol version and accrue to liquidity providers. Protocol fees may apply when enabled through governance.

How to start

Read the official documentation first, and confirm you are on the official site before connecting a wallet. This page does not list fee tiers or volumes, because they differ by pool and change over time. Check them at the source.

Risks to understand

  • Larger trades relative to a pool's depth move the price more. This is called price impact, and it can make a swap execute at a worse price than the quoted spot price.
  • Swap fees are set per pool and protocol version, so the cost of the same swap can differ between pools.
  • Protocol fees may apply when they are enabled through governance.

Questions

Does Uniswap use an order book?
No. Uniswap is an automated market maker. Traders swap against a liquidity pool of two tokens instead of matching with another trader's order.
Who provides the liquidity on Uniswap?
Anyone can become a liquidity provider by depositing tokens into a pool. Swap fees accrue to liquidity providers.
Can the Uniswap contracts be upgraded?
The Uniswap documentation describes the protocol as non-upgradeable.

Sources

  1. How Uniswap Works, Uniswap Developersaccessed

How this page works

“Visit website” always goes to the project’s official site and is never a referral link. Listings are not paid for. Facts come from the sources above and were last checked on the date at the top. If a figure could not be confirmed it is shown as “Not verified”, with no number. This page is educational and is not financial advice. Read the methodology.