Uniswap is a decentralized exchange project consisting of a set of smart contracts running on the Ethereum blockchain

What is Uniswap?



7 min

. It is one of the most popular decentralized finance (DeFi) protocols for providing services almost identical to a traditional exchange, but with additional benefits that decentralization provides.

To fully appreciate Uniswap and decentralized exchange, let's first recall how traditional trading on exchanges like Vanguard or Coinbase works.

When you buy an Apple stock (AAPL) on Vanguard or Bitcoin (BTC) on Coinbase, you “hire” Vanguard and Coinbase as intermediaries. They take your money and buy the asset in question from an exchange order book: a list of buyers and sellers. The price at which you buy AAPL or BTC is the price at which the other party has agreed to sell in advance (placed an order in the order book).

Traditional trading usually has the following characteristics:

  1. There is a trusted intermediary to execute your trades (Vanguard, Coinbase)
  2. There is an order book filled with buyers (bids) and sellers (asks) that determine the value of your trade.
  3. You do not own your assets directly - intermediaries hold them on your behalf.
  4. You are required to provide personal information to trade.

This traditional trading model has many advantages, is well established, and serves very large and efficient markets. If you have ever bought stocks from a broker or cryptocurrency on any major exchange (Coinbase, Binance, Kraken, etc.), then you have interacted with this particular model.

What is Uniswap?

Uniswap is an open-source protocol and cryptocurrency exchange system running on the Ethereum blockchain.

Uniswap specializes exclusively in trading ETH and Ethereum-based assets. At the time of writing, the size of this market exceeded $252 billion.

So what is the difference between Uniswap and the traditional trading model?

  1. There is no trusted intermediary to make transactions. You trade directly from your own Ethereum wallet (for example, MetaMask) using the Ethereum blockchain. This is what makes Uniswap a decentralized exchange (DEX).
  2. There is no order book. The buy or sell price is determined through automatic market-making, which is processed by smart contracts on the Ethereum blockchain.
  3. You directly store your Ethereum-based assets in your own wallet. There is no intermediary custody.
  4. No identity confirmation is required for the direct use of Uniswap and Ethereum

How Uniswap works

Automated market-making

Naturally, the question arises: if Uniswap does not use an order book, how exactly does it determine the buy and sell price at any given time?

Instead of an order book, Uniswap has developed a smart mechanism called automated market-making (AMM). AMM allows Uniswap exchanges to always specify a price, even for very small markets, without requiring buyers and sellers to pre-place their orders at fixed prices.

To make this automated market design work, Uniswap replaced order books with a new concept: liquidity pools.

Liquidity pools

Instead of relying on buyers and sellers to pre-position prices and build an order book, Uniswap encourages investors (also known as “LPs” or “Liquidity Providers”) to pool their Ethereum-based assets into Uniswap smart contracts in exchange for a share of the transaction fee.

These invested assets are automatically allocated to transactions using smart contracts based on Uniswap protocol rules. As more transactions are made, investors (LPs) accumulate more transaction fees.

Each trading pair on Uniswap has its own liquidity pool. Anyone in the world can create Uniswap trading pairs or provide them with liquidity.

One of the most popular trading pairs on Uniswap is USDC-ETH. This pair allows you to exchange USD for ETH or vice versa.

To become an investor in the USDC-ETH liquidity pool, you must contribute an equal ratio (50% / 50%) of both assets to the pool. To invest $1 000, you will need to contribute $500 in USDC and $500 in ETH.

Liquidity tokens (LP tokens)

Investors are willing to pool their assets in Uniswap because there is a financial incentive: they receive a share of transaction fees (currently 0,30% of each transaction).

When investors pool their assets into Uniswap, they receive liquidity tokens (LP tokens) in return. These LP tokens are conceptually similar to owning stocks or capital: they represent a direct claim on part of the overall liquidity pool and accumulated transaction fees.

If you become an investor in the USDC-ETH trading pair, you will deposit USDC and ETH in equal amounts and receive a Uniswap USDC-ETH LP token in return.

When investors want to get cash from a certain pool, they simply sell their Uniswap LP tokens and receive assets from the pool according to their ownership stake. Because of the accumulation of commissions, the sum of the assets you receive should be greater than the one you invested.

We won't go into much depth here in analyzing Uniswap LP returns, but if you want to learn more, we suggest learning more about impermanent losses (divergence losses). The impermanent loss is a key factor to consider when investing in Uniswap liquidity pools.

Using this liquidity pool model, Uniswap has raised billions (in dollar terms) of capital from investors. At the time of writing, more than $1,5 billion has been invested, powering thousands of decentralized trading pairs.

UNI token

UNI is a Uniswap service token, which is an ERC-20 token on the Ethereum blockchain that is designed to initiate and encourage community participation in the shared decentralized management of Uniswap. It was launched on September 16, 2020, with a maximum offer of 1 billion tokens.

After an initial grace period of 30 days, control of the Uniswap treasury was given to the community. The community can vote to allocate UNI to grants, strategic partnerships, governance initiatives, additional liquidity mining pools, and other programs.

Although management proposals can change most of the protocol, some elements, such as the Uniswap board switch, are hard-coded (0,05%). However, other factors, such as adding more pools, came under the control of the community after the initial grace period.

Notably, the Uniswap team announced its intention not to participate in the protocol development, auditing, or “other matters.” Instead, the community takes full responsibility and is even encouraged to consult with knowledgeable legal and regulatory experts before implementing any particular proposal.

Why use Uniswap?

We have looked at how Uniswap is different from traditional trading and exchanges. But why is it beneficial? When might someone prefer Uniswap over traditional exchanges like Coinbase?

  • Not related to coin storage

Although the quality and security of cryptocurrency exchanges have improved significantly over the past decade, there are still alarming statistics of hacks that lead to the loss of customer funds.

Since custodial exchanges store huge amounts of assets on behalf of users, they are constantly under attack. When the attack reaches its target, users who store their assets on the exchange are unlikely to recover their assets.

Uniswap, as a decentralized exchange, does not require you to give up control over your assets for trading. You can trade on Uniswap via Ethereum without leaving your own wallet.

Independent storage of cryptocurrencies is not a risk-free activity, as it is the individual's responsibility to ensure security.

  • Completely independent

When trading on traditional exchanges, you depend on the exchange in at least two aspects:

  1. You must obtain permission to exchange or transfer by confirming your identity and providing confidential personal information.
  2. The available currency pairs are selected at the discretion of the exchange.

On Uniswap, you do not need permission to trade, transfer or invest in liquidity pools. Anyone in the world with an Internet connection and an Ethereum wallet can participate. Users who value privacy, or those who live in countries with increased capital controls, can appreciate this aspect of Uniswap and decentralized exchange.

Uniswap is also not limited in which trading pairs it can offer or support. Anyone can create a trading pair between two assets based on Ethereum and create an initial pool of liquidity. This leads to a huge combination of trading pairs for multiple assets.

  • Unique trading pair support

Since it is so easy to create a trading pair on Uniswap, new Ethereum-based assets are often placed here in the first place. Even when trading pairs are later added on custodial exchanges (Coinbase Pro, Binance), Uniswap often has very competitive liquidity and commissions.


Uniswap is one of the success stories of Ethereum and DeFi. It has become one of the most important parts of the DeFi ecosystem and has proven that decentralized applications can compete, and sometimes win, compared to centralized alternatives.

It will be interesting to observe what innovations the Uniswap team will offer in the future, and to see how the project will grow as the cryptocurrency becomes more and more popular.

Subscribe to Getblock Magazine and stay up to date with the latest news from the world of cryptocurrencies and the digital economy