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.
In Uniswap, there are three primary parties:
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.
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.
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.
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.
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.
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.
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.
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:
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”.