• Uniswap is a decentralized exchange protocol built on the Ethereum blockchain that offers non-custodial trading of ERC-20 tokens. Its first version (Uniswap v1) has been operating since November 2018 (launching at DevCon 4), while the second version (Uniswap v2) launched in May 2020.

  • In Uniswap, users can swap tokens, add tokens to a pool to earn fees, or list a token without trusting any central intermediary. Since all interactions are done directly on-chain and thus cost gas fees, Uniswap has become the most significant gas contributor on the Ethereum public network and became the most widely used decentralized application as of the time of writing.

  • Uniswap is built on a unique system called Automated Market Maker (AMM). At its core, liquidity is created by pools composed of two ERC-20 tokens. As a reward for liquidity provision, parties (Liquidity Providers, or LPs) collect swap fees that are incurred whenever individuals swap tokens. In Uniswap v2, swap fees are set at 0.30% of the notionally traded amount. Collected fees are allocated to the reserve of the pool. Once the protocol switch is turned on, UNI holders will collect 0.05% of each swap, while LPs' reward will decrease to 0.25%.

  • Despite not being the first AMM, Uniswap has popularized the growth of automated market maker protocols, leading to the creation of competing protocols like SushiSwap, which greatly rely on its set of audited open source contracts.

  • UNI is an ERC-20 token on the Ethereum blockchain that offers control over the Uniswap protocol governance, the UNI token community treasury, the protocol fee switch (0.05% of the fee would be collected by UNI token holders if activated), eth ENS, Uniswap default token list (tokens.uniswap.eth), and SOCKS liquidity tokens.

1. How does Uniswap work?

1.1 An automated market-making DEX on Ethereum

Uniswap is an automated market-making (AMM) decentralized exchange on the Ethereum blockchain. The Uniswap protocol is made up of a series of smart contracts that hold pairs of tokens. These smart contracts let users exchange any ERC-20 token against each other.

AMM Uniswap description

Source: Uniswap.

In Uniswap, there are three primary parties:

  • Liquidity Providers (“LP”) add assets to Uniswap pools (the reserves) and receive liquidity shares called “Pool Tokens” as compensation. They can create new pools, add liquidity to existing pools, and remove tokens from reserves they contribute to (by sending LP Shares).

  • Traders are individuals looking to exchange two tokens (e.g., buy KNC with USDT). They pay the swap fee, which is effectively added to the reserve of the pool KNC/USDT.

  • Arbitrageurs monitor any price deviation with other trading venues (e.g., Binance) to profit from this. This enforces an efficient price mechanism at a pool-level.

1.2 A dynamic price mechanism based on constant product function

Any party can earn a commission for contributing their tokens to a “liquidity pool”, which ensures tokens are available when needed for trading needs.

A 0.3% fee is charged whenever a swap is made. Liquidity providers (LPs) are parties who provide liquidity by adding tokens to a specific pool. As a reward, they receive these fees based on how much they contribute to the pool.

How are prices moving in Uniswap?

Source: Uniswap.

Uniswap relies on a constant product function to determine the market price.

The formula is x * y = k, with x and y equal to the pair reserve balance (e.g., BUSD and USDC) while k is a constant.

Fees are collected for each swap, which increases the k constant in the previous formula as after each trade since they are “reinvested” into the reserve directly.

1.3 Differences with the orderbook model

Most exchanges work on an order book model - where the market prices are determined by the highest buy price and the lowest sell price. Other decentralized exchanges like Binance DEX, IDEX, and Loopring DEX are built on an orderbook model that closely matches the trading experience of popular centralized exchanges like Binance, Kraken, and Bitfinex.

In contrast, Uniswap uses liquidity pools, where the price comes from the ratio of one token to another in a pool. This system is similar to other crypto projects like Bancor and Kyber.

liquidity pools on Uniswap

Source: Uniswap.

When a trader executes a swap between two tokens (e.g., selling 100 KNC to DAI), the balance of reserves changes, resulting in a new pool price.

The price of a token on Uniswap is kept in check by arbitrage. For instance, if a token is priced too low, an arbitrageur can buy it and sell for a profit on another exchange until the price is balanced out.

1.4 Differences between Uniswap v1 and Uniswap v2

Uniswap v1 only accepts pools of ERC-20 vs. ETH. Hence, it is only possible to create a single pool per asset and has led to a dependence on ether's price, which would sometimes lead to impairment losses.

In Uniswap v2, many pools can be created like USDC/BUSD, DAI/KNC, or DAI/ETH. The addition of unique pairings can lead to fewer “trade hops” from users' perspective, ultimately improving price execution by lowering the gas fees, liquidity fees, and slippage.

Uniswap v1 was designed to be censorship-resistant and will always remain in existence alongside Uniswap v2 since the contracts have been deployed on the Ethereum blockchain without any possibility to revoke them.

Uniswap v2’s additional elements include the protocol switch (allowing UNI token holders to collect 0.05% of the swap fee vs. 0.25% for liquidity providers), a new price oracle logic, flash swaps, and a change in the contract architecture. For more details, please visit its official website.

2. Token economics

2.1 UNI token supply

1 billion UNI tokens have been minted. This initial supply will be fully diluted over the four next years, with an allocation breakdown, as follows.

  • 60.00% to Uniswap community members / 600,000,000 UNI.

  • 21.51% to team members and future employees with 4-year vesting / 215,101,000 UNI.

  • 17.80% to investors with 4-year vesting / 178,000,000 UNI.

  • 0.069% to advisors with 4-year vesting / 6,899,000 UNI

UNI genesis token supply distribution (%)

Part of the launch of the UNI token, 60% of the UNI genesis supply has been allocated to community members. As of September 17th 2020, ¼ of this supply (representing 15% of the total initial supply) was distributed to reward past Uniswap users, who can claim tokens directly on the governance portal.

The rest of the allocation will be offered through liquidity mining (“yield farming”) on four pre-selected pools: ETH/USDT, ETH/USDC, ETH/DAI, and ETH/WBTC. This liquidity mining will last for 3 months.

From 2024, the supply will grow at a 2% annual inflation rate.

2.2 Token use cases

UNI is an ERC-20 token on the Ethereum blockchain that intends to initiate and incentivize community participation via “shared community ownership and a vibrant governance system”.

After an initial grace period of 30 days, control over the Uniswap treasury will be handed over to the community. The community will be able to vote to “allocate UNI towards grants, strategic partnerships, governance initiatives, additional liquidity mining pools, and other programs.”

While governance proposals may change most of the protocol, certain elements such as the Uniswap fee switch are hardcoded (at 0.05%). However, other factors, as for example the addition of more pools will be controlled by the community after the initial grace period. To be accepted, a governance proposal must meet the following conditions:

  • 1% of UNI total supply (delegated) to submit a governance proposal.

  • 4% of UNI supply required to vote “yes” to reach quorum.

  • 7 day voting period.

  • 2 day timelock delay on execution.

Notably, the Uniswap team has stated their intent not to be involved in the development of the protocol, auditing, or “other matters”. Instead, the community will be fully responsible and even encouraged to “consult knowledgeable legal and regulatory professionals before implementing any specific proposal”.

3. Project team

Hayden Adams
Noah Zinsmeister
Engineer Lead
Ian Lapham
Moody Salem
Matteo Leibowitz
Strategy Lead

4. Appendix