Search

Search for projects and tokens by name or address

Uniswap V2 logo
Uniswap V2

About

Uniswap v2 is a constant-product AMM where anyone can create an immutable, adminless pair for any two tokens. User funds sit only in the pairs, which no one can upgrade or pause, and every swap pays a 0.3% fee to liquidity providers. UNI tokenholder...


About

Uniswap v2 is a constant-product AMM where anyone can create an immutable, adminless pair for any two tokens. User funds sit only in the pairs, which no one can upgrade or pause, and every swap pays a 0.3% fee to liquidity providers. UNI tokenholder...

Uniswap v2 is a constant-product automated market maker: a set of immutable pair contracts on Ethereum where anyone can swap one ERC-20 token for another against liquidity other users have deposited. There is no operatorAn operator is the entity charged with managing a rollup and progressing its state. A rollup operator can be a centralized sequencer, proposer, prover, challenger, pauser of admin that is able to perform upgrades. in the trading path and user funds sit only in the pairs, which have no admin, no pause switch, and no upgrade path. The router most users interact with is a convenience that holds no user funds: any contract can trade with a pair and provide liquidity without it.

UNI tokenholder governance exists alongside the pairs rather than above them. Acting through a 2-day timelock, it can choose the recipient of a protocol fee whose size is fixed in the pair code; it cannot upgrade or pause a pair, move liquidity providers’ funds, or censor swaps or pair creation.

Pairs

Each pair holds two tokens and prices them so that the product of the two reserves never decreases. Every swap pays a 0.3% fee on the input, which stays in the pair and accrues to liquidity providers. Liquidity is spread across all prices, so a position earns fees whatever the price, and is represented by an ERC-20 LP token for its share of the pair. The first deposit into a pair permanently locks a minimum of 1,000 LP token units, which makes manipulating the share price of a new pair expensive.

Pair creation is permissionlessAnyone willing should be able to join and leave the network at any time, without causing significant disturbance to the network or being detrimental to the party in question. No single entity should have the power to allowlist or blocklist participants.: anyone can have the factory deploy a pair for any two tokens, one pair per token pair. Pairs are deployed with CREATE2, so a pair’s address is computable in advance from the factory address and the two tokens. Once deployed, a pair never changes: its tokens and its fee are fixed.

A swap can send tokens out before they are paid for, as long as the pair is paid back, plus the fee, within the same transaction. These flash swaps let a contract borrow either token, or both, for the length of a transaction. Anyone can also bring a pair’s recorded reserves in line with its actual balances, or take any tokens sent to it beyond those reserves.

Router

Swaps and liquidity changes normally go through UniswapV2Router02, which finds the pairs from the factory, moves tokens in and out, and checks the user’s limits. Every entry point takes a deadline and a minimum output or maximum input, so a transaction that waits too long or would trade at a worse price reverts. Which pairs a trade crosses is computed offchain by the interface or a routing API, and the chain never verifies that the chosen route was the best one, so the slippage tolerance, not the quote, is the real protection. The router also has variants for tokens that charge a fee on transfer, and it wraps and unwraps ETH.

The built-in oracle

Every pair doubles as a price oracle: on the first interaction in each blockAn ordered list of transactions and chain-related metadata that gets bundled together and published to the L1/DA layer. Nodes execute the transactions contained within blocks to change the rollup chain’s state. Protocol rules dictate what constitutes a valid block, and invalid blocks are skipped over. it adds the current prices to two running sums weighted by time. Anyone can read these sums at two moments and divide by the time between them to get a time-weighted average price, without any offchain reporter. Unlike Uniswap v3, a pair keeps no history of past values, so the reader has to record the first value itself.

Governance and the fee switch

Protocol control sits with UNI holders. An address with more than 1,000,000 UNI of delegated votes can submit a proposal to GovernorBravo; voting starts 13,140 blocks later and runs for 40,320 blocks. Passing takes more for- than against-votes and at least 40,000,000 UNI voting for. A passed proposal is queued in the Timelock and executable 2 days later. The same Timelock is the UNI token’s minter, with new issuance capped at 2% per mint and a minimum interval of 1 year.

Over the pairs, governance holds one control knob, exercised through the factory’s fee setter role: choosing the recipient of the protocol fee, where no recipient means the fee is off. The pair code fixes the fee at 1/6 of LP fees, paid by minting LP tokens to the recipient when liquidity is added or removed, so the fee can never be raised and can never touch principal.

The protocol fee is switched on. Since the UNIfication proposal the fee setter role sits with the Timelock and the recipient is the TokenJar, which collects the LP tokens. Under the current configuration, the Firepit releases TokenJar balances to anyone who first burns the configured threshold of UNI. This disposal path is governed rather than immutable: after the timelock, governance can choose another recipient, replace the TokenJar releaser, or change the Firepit threshold.

Governance cannot upgrade, pause, or drain a pair, change a pair’s swap fee, block a swap, or stop anyone from creating a pair.

  1. Uniswap v2 Core Whitepaper
  2. UNIfication proposal (protocol fees & UNI burn)
Data source: DeFiLlama · Tracked chains: Ethereum

This project has no external dependencies: no oracle, bridge, or other third-party contract is required for its contracts to operate.

Ossification

Contracts our research team classifies as critical form the project's critical perimeter. Its clock starts at the ossification genesis, and every critical change resets it (changes within 24 hours count as one). The ossification score is the share of recorded code-bug exploits whose exploited code was younger than this perimeter is today. Battle-tested exposure is the value secured, summed over that unchanged period.

Ossification %
99since 2020 May 04
TVL & changes (1Y)
Battle-tested exposure
$13.21 B·yearsTVL (source: DefiLlama)
Critical changes / year
0across 3 contracts
Exit window
N/A

Discovery updates

2026 October 09, 09:12 UTC
9changes

Initial discovery of Uniswap V2: the factory, two representative pairs, Router02, and the governance and protocol fee contracts it shares with Uniswap V3.

Initial discovery

+ Status: CREATED
contract UniswapV2Pair_WETH_USDT (eth:0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852) [uniswapv2/UniswapV2Pair]
+++ description: A constant-product AMM pool for one token pair, deployed by the factory and fully immutable: no owner, no pause, no upgrade path. Swaps pay a 0.3% fee to liquidity providers. If the factory has a protocol fee recipient set, the pair mints it 1/6 of those fees as LP tokens. Also a cumulative-price oracle anyone can read.
+ Status: CREATED
contract Firepit (eth:0x0D5Cd355e2aBEB8fb1552F56c965B867346d6721) [uniswapv3/Firepit]
+++ description: Burn-and-release contract: anyone can transfer the configured threshold (currently 4,000 UNI) to a fixed burn address and release selected balances from its token jar to a chosen recipient. The threshold setter can change the threshold, including to zero, and the owner can replace the threshold setter.
+ Status: CREATED
contract Timelock (eth:0x1a9C8182C09F50C8318d769245beA52c32BE35BC) [uniswapv3/Timelock]
+++ description: Compound-style timelock. Its admin can queue, cancel, and execute transactions. A queued transaction becomes executable after 2d and remains executable for a 14d grace period. The delay can be changed only through the timelock itself and must remain between 2d and 1mo. After the one-time admin initialization path has been used, changing the admin requires a timelocked self-call; there is no emergency bypass.
+ Status: CREATED
contract UNIToken (eth:0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984) [uniswapv3/Uni]
+++ description: ERC20 governance token with checkpoint voting. Its constructor mints a fixed initial supply; the minter can mint at most 2% of supply per mint, with a minimum interval of 1y. Votes count only when delegated.
+ Status: CREATED
contract GovernorBravo (eth:0x408ED6354d4973f66138C91495F2f2FCbd8724C3) [uniswapv3/GovernorBravoDelegate]
+++ description: Upgradeable Governor Bravo governance proxy. Holders with more than the current proposal threshold of 1,000,000 UNI can create proposals. Voting begins 13,140 blocks after proposal creation and lasts 40,320 blocks; success requires more for-votes than against-votes and at least 40,000,000 UNI voting for. Successful proposals are queued in the configured timelock. The proxy admin can replace the implementation or nominate a new admin.
+ Status: CREATED
contract UniswapV2Factory (eth:0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f) [uniswapv2/UniswapV2Factory]
+++ description: Deploys Uniswap v2 pairs: anyone can create one pair per token pair, at a CREATE2 address deterministic in the two tokens. Immutable. Its fee setter can switch a protocol fee on or off by choosing its recipient, and can hand the setter role to another address. It cannot modify, pause, or upgrade deployed pairs, or touch their funds.
+ Status: CREATED
contract UniswapV2Router02 (eth:0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D) [uniswapv2/UniswapV2Router02]
+++ description: Stateless periphery that routes swaps and liquidity changes through Uniswap v2 pairs. Immutable, with no owner, and it holds no user funds between transactions.
+ Status: CREATED
contract UniswapV2Pair_USDC_WETH (eth:0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc) [uniswapv2/UniswapV2Pair]
+++ description: A constant-product AMM pool for one token pair, deployed by the factory and fully immutable: no owner, no pause, no upgrade path. Swaps pay a 0.3% fee to liquidity providers. If the factory has a protocol fee recipient set, the pair mints it 1/6 of those fees as LP tokens. Also a cumulative-price oracle anyone can read.
+ Status: CREATED
contract TokenJar (eth:0xf38521f130fcCF29dB1961597bc5d2B60F995f85) [uniswapv3/TokenJar]
+++ description: Token escrow whose releaser can transfer held balances. The owner can replace the releaser, changing who controls accumulated and future deposits.
A dashboard to explore contracts and permissions
Go to Disco
Disco UI Banner

Ethereum

Actors:

GovernorBravo0x408E…24C3

Upgradeable Governor Bravo governance proxy. Holders with more than the current proposal threshold of 1,000,000 UNI can create proposals. Voting begins 13,140 blocksAn ordered list of transactions and chain-related metadata that gets bundled together and published to the L1/DA layer. Nodes execute the transactions contained within blocks to change the rollup chain’s state. Protocol rules dictate what constitutes a valid block, and invalid blocks are skipped over. after proposal creation and lasts 40,320 blocks; success requires more for-votes than against-votes and at least 40,000,000 UNI voting for. Successful proposals are queued in the configured timelock. The proxy admin can replace the implementation or nominate a new admin.

  • Can upgrade with 2d delay
    • GovernorBravo
  • Can interact with Firepit
    • can change the burn-token amount required per token-jar release with 2d delay
    • can replace the thresholdSetter with 2d delay
  • Can interact with Timelock
    • can queue, cancel, and execute timelocked transactions, and change the delay or admin (through the timelock itself)
  • Can interact with UNIToken
    • can mint up to 2% of the token supply per mint after the minimum 1y interval, and set a new minter with 2d delay
  • Can interact with GovernorBravo
    • can set the voting delay, the voting period, and the proposal threshold with 2d delay
  • Can interact with UniswapV2Factory
    • can set the protocol fee recipient, which switches on a protocol fee of 1/6 of LP swap fees on every pair, and transfer the fee setter role with 2d delay
  • Can interact with TokenJar
    • can replace the releaser and thereby redirect all held and future token balances with 2d delay
Used in:
A dashboard to explore contracts and permissions
Go to Disco
Disco UI Banner

Ethereum

UniswapV2Pair_WETH_USDT0x0d4a…1852

A constant-product AMM pool for one token pair, deployed by the factory and fully immutable: no owner, no pause, no upgrade path. Swaps pay a 0.3% fee to liquidity providers. If the factory has a protocol fee recipient set, the pair mints it 1/6 of those fees as LP tokens. Also a cumulative-price oracle anyone can read.

Burn-and-release contract: anyone can transfer the configured threshold (currently 4,000 UNI) to a fixed burn address and release selected balances from its token jar to a chosen recipient. The threshold setter can change the threshold, including to zero, and the owner can replace the threshold setter.

  • Roles:
    • owner: Timelock; ultimately GovernorBravo
    • thresholdSetter: Timelock; ultimately GovernorBravo
Implementation used in:

Compound-style timelock. Its admin can queue, cancel, and execute transactions. A queued transaction becomes executable after 2d and remains executable for a 14d grace period. The delay can be changed only through the timelock itself and must remain between 2d and 1mo. After the one-time admin initialization path has been used, changing the admin requires a timelocked self-call; there is no emergency bypass.

  • Roles:
    • admin: GovernorBravo
Implementation used in:

ERC20 governance token with checkpoint voting. Its constructor mints a fixed initial supply; the minter can mint at most 2% of supply per mint, with a minimum interval of 1y. Votes count only when delegated.

  • Roles:
    • minter: Timelock; ultimately GovernorBravo
Implementation used in:
UniswapV2Factory0x5C69…aA6f

Deploys Uniswap v2 pairs: anyone can create one pair per token pair, at a CREATE2 address deterministic in the two tokens. Immutable. Its fee setter can switch a protocol fee on or off by choosing its recipient, and can hand the setter role to another address. It cannot modify, pause, or upgrade deployed pairs, or touch their funds.

  • Roles:
    • feeToSetter: Timelock; ultimately GovernorBravo
UniswapV2Router020x7a25…488D

Stateless periphery that routes swaps and liquidity changes through Uniswap v2 pairs. Immutable, with no owner, and it holds no user funds between transactions.

UniswapV2Pair_USDC_WETH0xB4e1…C9Dc

A constant-product AMM pool for one token pair, deployed by the factory and fully immutable: no owner, no pause, no upgrade path. Swaps pay a 0.3% fee to liquidity providers. If the factory has a protocol fee recipient set, the pair mints it 1/6 of those fees as LP tokens. Also a cumulative-price oracle anyone can read.

Token escrow whose releaser can transfer held balances. The owner can replace the releaser, changing who controls accumulated and future deposits.

  • Roles:
    • owner: Timelock; ultimately GovernorBravo
Implementation used in: