Everything you need to know about Uniswap (UNI)

Spread the love

Uniswap is a set of computer programs which run on the Ethereum blockchain and allow for decentralized token swaps. It works with the help of unicorns (as it is illustrated by its logo).

Traders can exchange ETH tokens on Uniswap without having to trust anyone with their funds. Meanwhile, anyone can lend their cryptocurrency to special reserves which are called liquidity pools. In exchange for providing money to these pools, they earn fees.


Centralized exchanges have been the basis of the cryptocurrency market for years. They provide fast settlement times, high trading volume, and continually improving liquidity. However, there’s a parallel world being created in the form of trustless protocols. Decentralized exchanges (DEX) need no middlemen or custodians to facilitate trading. 

Due to the inherent limitations of blockchain technology, it has been a challenge to create DEXes that meaningfully compete with their centralized counterparts. Most DEXes could develope both in terms of performance and user experience.

Many developers have been thinking about new methods to create a decentralized exchange. One of the pioneers of this is Uniswap. The way Uniswap works may be a bit harder to understand than a more traditional DEX. However, we’ll soon see that this model brings some excellent benefits. 

Therefore, Uniswap has become one of the most successful projects that’s part of the Decentralized Finance (DeFi) movement.

What is Uniswap?

Uniswap is a decentralized exchange protocol created on Ethereum. It is an automated liquidity protocol. There is no order book or any centralized party needed to make trades. Uniswap enables users to trade without intermediaries, with a high degree of decentralization and censorship-resistance.

Uniswap is open-source software. You can check it out on the Uniswap GitHub.

Uniswap works with a model that involves liquidity providers making liquidity pools. This system provides a decentralized pricing method that essentially smooths out order book depth. We’ll get into how it works in more detail. For now, just remember that users can seamlessly swap between ERC-20 tokens without the need for an order book.

Since the Uniswap protocol is decentralized, there is not any listing process. Essentially any ERC-20 token can be launched as long as there is a liquidity pool for traders. So Uniswap doesn’t charge any listing fees, either. In a sense, the Uniswap protocol acts as a kind of public good.

The Uniswap protocol was launched by Hayden Adams in 2018. But the underlying technology that inspired its implementation was first described by Ethereum co-founder, Vitalik Buterin.

How does Uniswap work?

Uniswap leaves behind the traditional architecture of digital exchange in that it has no order book. It works with a design named Constant Product Market Maker, which is a variant of a model called Automated Market Maker (AMM).

Automated market makers are smart contracts that hold liquidity reserves (or liquidity pools) that traders can trade against. These reserves are funded by liquidity providers. Everybody can be a liquidity provider who deposits an equivalent value of two tokens in the pool. In return, traders pay a fee to the pool that is then distributed to liquidity providers according to their share of the pool.

Liquidity providers build a market by depositing an equivalent value of two tokens. These can either be ETH and an ERC-20 token or two ERC-20 tokens. These pools are commonly made up of stablecoins like DAI, USDC, or USDT, but this isn’t a requirement. In return, liquidity providers get “liquidity tokens,” that shows their share of the entire liquidity pool. These liquidity tokens can be redeemed for the share they represent in the pool.

So, let’s consider the ETH/USDT liquidity pool. We’ll call the ETH portion of the pool x and the USDT portion y. Uniswap takes these two and multiplies them to calculate the total liquidity in the pool. Let’s call this z. The core idea behind Uniswap is that z must remain constant, meaning the total liquidity in the pool is constant. So, the formula for total liquidity in the pool is: 

x * y = z

So, what happens when someone wants to make a trade?

Let’s say someone buys 1 ETH for 300 USDT using the ETH/USDT liquidity pool. By doing that, she rises the USDT portion of the pool and decreases the ETH portion of the pool. This effectively means that the price of ETH goes up. Why? There is less ETH in the pool after the transaction, and we know that the total liquidity (z) must remain constant. This mechanism is what determines the pricing. Finally, the price paid for this ETH is based on how much a given trade shifts the ratio between x and y.

It’s worth saying that this model does not scale linearly. In effect, the larger the order is, the more it shifts the balance between x and y. This means that larger orders become exponentially more expensive in comparison to smaller orders, resulting in larger and larger amounts of slippage. It also means that the larger a liquidity pool is, the easier it is to process large orders. Why? In that case, the shift between x and y is smaller.

What is impermanent loss?

As we’ve said, liquidity providers earn fees for providing liquidity to traders who can swap between tokens. Is there anything else liquidity providers should be aware of? Yes. There’s an effect named impermanent loss.

Let’s say that Alice deposits 1 ETH and 100 USDT in a Uniswap pool. Since the token pair has to be of equivalent value, this means that the price of ETH is 100 USDT.  Meanwhile, there’s a total of 10 ETH and 1,000 USDT in the pool – the rest funded by other liquidity providers. This means that someone we talked about has a 10% share of the pool. Our total liquidity (z), in this case, is 10,000.

What happens if the price of ETH rises to 400 USDT? Remember, the total liquidity in the pool has to remain constant. If ETH is now 400 USDT, that means that the ratio between how much ETH and how much USDT is in the pool has changed. Actually, there is 5 ETH and 2,000 USDT in the pool now. Why? Arbitrage traders will add USDT to the pool and remove ETH from it until the ratio reflects the accurate price. This is why it’s crucial to understand that z is constant.

So, she decides to withdraw her funds and gets 10% of the pool according to her share. As a result, she gets 0.5 ETH and 200 USDT, totaling 400 USDT. It looks like she made a nice profit. But hang on, what would have happened if she didn’t put her funds in the pool? She’d have 1 ETH and 100 USDT, totaling 500 USDT.

In fact, she would have been better off by HODLing rather than depositing into the Uniswap pool. So the impermanent loss is essentially the opportunity cost of pooling a token that appreciates in price. This just means that by depositing funds into Uniswap in hopes of earning fees, she may lose out on other opportunities.

Note that this effect works regardless of what direction the price changes from the time of the deposit. What does this mean? If the price of ETH decreases in comparison to the time of the deposit, the losses may also be amplified. But why is the loss impermanent? If the price of the pooled tokens returns to the price when they were added to the pool, the effect is mitigated. Moreover, since liquidity providers earn fees, the loss may get balanced out over time. Even so, liquidity providers have to be aware of this before adding funds to a pool.

How does Uniswap make money?

It doesn’t. All fees go to liquidity providers, and none of the founders get a cut from the trades that happen through the protocol.

Currently, the transaction fee paid out to liquidity providers is 0.3% for each trade. By default, these are added to the liquidity pool, but liquidity providers can redeem them at any given time. The fees are distributed according to each liquidity provider’s share of the pool.

A portion of fees can be dedicated to Uniswap development in the future. The Uniswap team has already deployed an improved version of the protocol called Uniswap v2.

How to use Uniswap

Uniswap is an open-source protocol, so anyone could make their own frontend application for it. However, the most commonly used one is or

  • Go to the Uniswap interface.
  • Connect your wallet. You can use MetaMask, Trust Wallet, or other supported Ethereum wallets.
  • Choose the token you’d like to exchange from.
  • Choose the token you’d like to exchange to.
  • Click on Swap.
  • Preview the transaction in the pop-up window.
  • Confirm the transaction request in your wallet.
  • Wait for the transaction to be confirmed on the Ethereum blockchain. You can check its status on

The Uniswap (UNI) token

UNI is the native token of the Uniswap protocol, and it entitles its holders to governance rights. This just means that UNI owners can vote on changes to the protocol. We’ve discussed how the protocol has already been acting as a sort of public good. The UNI token solidifies this idea.

1 billion UNI tokens have been minted at genesis. 60% of them are distributed to existing Uniswap community members, while 40% will be made available to team members, investors and advisors in four years.

Part of the community distribution happens through liquidity mining. This means that UNI will be distributed to those who provide liquidity to the following Uniswap pools:


Any Ethereum address that has interacted with the Uniswap contracts are Uniswap community members.

How to claim Uniswap (UNI) tokens

If you’ve used Uniswap, you can likely claim 400 UNI tokens per address that you used Uniswap with. To claim them:

  • Go to
  • Connect the wallet that you previously used Uniswap with. 
  • Click on “Claim your UNI tokens”.
  • Confirm the transaction in your wallet (check the current gas prices at the Ethscan Gas Tracker).
  • You’re now a UNI holder!

Leave a Reply

Your email address will not be published.