What is Uniswap and How Does It Work?

14 MIN

Start Trading on 3Commas Today

Get full access to all 3Commas trading tools with free trial period

It is one of the few emerging decentralized cryptocurrency exchanges (DEX) that operate on the Ethereum blockchain and facilitate token swaps. Before we further explore Uniswap along with Uniswap token, let's first understand the problem it is attempting to solve.

The Liquidity Challenge

An overwhelming majority of cryptocurrency investment and trading is done through centralized exchanges like Binance or Coinbase. These services are owned and operated by a single organization which yields all the power. As a user, you are required to deposit and store your funds under a single entity's control which relies on a conventional order book for trading digital assets.

Order book system is where trade orders are accumulated and presented in a list that also includes the total amount of each order. The number of open trade orders for a particular cryptocurrency is referred to as 'market depth'. For a successful trade to occur through the order book system, every buy order must have a corresponding sell order featuring the same price and the amount of the digital currency. 

The primary issue with the order book system is its liquidity. It means that at any given point, there might not be enough market depth i.e. the number of trade orders to fulfil every buy and sell order. This results in a poor trading experience as users fail to complete their buy and sell orders.

So What is Uniswap mean?

As mentioned in the introduction, Uniswap is a unique type of cryptocurrency exchange that is completely decentralized. It means that it is not owned and governed by a single organization. Built in 2018 on top of the Ethereum network, the exchange relies on a new trading model known as automated liquidity protocol. Since the exchange uses the Ethereum blockchain, it ensures compatibility with all ERC-20 coins as well as software applications including wallets.

One of the major advantages of Uniswap is that it is an open-source project so anyone can use the code to build their own decentralized crypto exchange. It enables users to list cryptocurrencies on the exchange at no cost which is completely opposite to centralized exchanges that are business-oriented and profit-driven. They charge a high commission fee to list new tokens on their exchange. 

Since Uniswap is a decentralized exchange or DEX, it means that traders can exercise complete control over their funds at all times and don't have to give up their private keys which are used to log orders on the centralized exchange's internal database. By having control over private keys, Uniswap reduces the risk of losing your digital assets if the exchange becomes a victim of a security breach. Currently, Uniswap v2 is the fourth largest decentralized finance (DeFi) exchange with more than $3 billion in crypto coins.

Uniswap Native Token - UNI

Just like any other blockchain, Uniswap also has a native token which is denoted by the initials of UNI and is used for governance primarily. Those who are holding UNI tokens have the right to vote on changes and new developments on the platform including how newly minted tokens should be distributed among the developers and community members along with changes to how the transaction charges are structured. The UNI token was officially launched in September 2020 to prevent users from opting for competing for decentralized exchanges. 

At genesis, 1 billion UNI tokens were minted out of which 60% have been distributed among the existing Uniswap community members while 40% will be distributed among multiple stakeholders including investors, advisors, and team members over a period of 4 years. A portion of community distribution occurs through liquidity mining which means that UNI is given to those who provide liquidity to a wide range of pools including the following.


How Does Uniswap Work?

The Role of Automated Liquidity Protocol

Uniswap relies on an automated liquidity protocol to solve the liquidity problem that plagues most centralized exchanges. The system works more effectively because it incentivizes users on the DEX to sign up as liquidity providers (LPs). All of the LPs pool their digital assets together to develop a sort of fund that's capable of executing all buy and sell trades happening on the exchange. Every listed cryptocurrency has its own pool and users have the option to make a contribution. The price of each digital currency is determined through an algorithm.

With the automated liquidity protocol, both buyers and sellers don't need to wait for another user who puts in an identical corresponding order. If the pool of the cryptocurrency they are interested in has enough liquidity, their order will be executed immediately at a predetermined price. Since LPs contribute their funds to create a pool, every LP gets a token that represents their share of contribution to the pool. For instance, if you have invested $5,000 in an automated liquidity pool that has $100,000 in funds, you will be entitled to a token for 5% of that pool. You have the option to redeem this token to acquire a share of the trading fees. 

Uniswap charges traders a flat fee of 0.30% for every order that is executed on the decentralized exchange and sends it to a liquidity pool. When an LP makes a decision to exit, they receive a percentage of the total fees from the pool that is representative of their staked amount. The token that keeps track of their stake percentage is then destroyed. The Uniswap v2 upgrade has introduced a new protocol fee that can be turned on or off through a community vote. It sends 0.05% of each transaction fee to a Uniswap fund that is used for financing future developments.

How Uniswap Determines the Token Price

Since decentralized exchanges don't use the order book system, there is an alternative system used to determine the price of each digital asset. It should be kept in mind that while the order book system matches the lowest seller with the highest buyer, Uniswap relies on an automated market maker protocol. This alternative system adjusts the price of digital coins based on their supply and demand which is determined through a mathematical equation. The equation works by increasing and decreasing the price of a particular digital asset based on the percentage of the coins present in its respective pool.  

It is important to bear in mind that when a user adds a new ERC-20 token to the platform, they are not only required to add a particular amount of their selected ERC-20 token but an identical amount of another ERC-20 token as well to start the automated liquidity pool. The equation that determines the price of the coin is x*y=k, where the amount of the first ERC-20 token is x and the amount of the second ERC-20 token is y. K remains a constant which means its value doesn't change.

For instance, John wants to trade Bitcoin (BTC) for Ripple (XRP) relying on the Uniswap BTC/XRP pool. Now, John will add a large amount of BTC to the pool which will increase the share of BTC in the pool to XRP. Since K is constant, it means the price of XRP will increase while the price of BTC in the pool will decrease. So the more BTC John puts in, the less XRP he gets in exchange because the price of XRP will continue to increase. Another factor that affects the price change is the size of the liquidity pool. The more liquidity there is in a pool, the simpler it is to execute large orders without affecting the price as much.

Arbitrage Trading

Arbitrage traders are an important part of the Uniswap platform. These are the trades that find price discrepancies across a number of exchanges and capitalize on the opportunity to pocket a profit. For instance, if Ethereum was trading on Coinbase for $2,000 and Kraken at $2,050, you can buy Ethereum on Coinbase and sell it on Kraken to make an easy profit. If arbitrage trading is done in large volumes, traders can secure a substantial profit without taking too much risk.

Arbitrage traders on Uniswap try to find cryptocurrencies that are trading below or above their market price because of large trades that generate asymmetry in the pool leading to price surge or reduction. Then they buy or sell such coins to make a profit. What arbitrage traders do is bring the token price to its market price by buying or selling until the price aligns with the market price. This particular phenomenon involving arbitrage traders and an automated market maker system is what keeps Uniswap token prices aligned with the rest of the cryptocurrency exchanges.

How to Use Uniswap

Using Uniswap is comparatively easy and straightforward. You will need to set up an ERC-20 supported wallet such as Coinbase wallet, Fortmatic, Portis, WalletConnect, or MetaMask. 

After you have set up one of the ERC-20 wallets, you need to transfer ETH tokens to it that will allow you to start trading on Uniswap and pay for gas (Ethereum transaction fees). Gas payments change from time to time in terms of price and they are usually based on the number of people using the network. 

The majority of ERC-20 compatible wallets give you the options to choose the speed of paying through the Ethereum blockchain including slow, medium or fast. The slow option is the cheapest option while fast will set you back a substantial sum. On the other hand, the medium is somewhere in between the two. This will determine at what speed your transaction is completed by Ethereum network miners.

  • Step 1 - Go to the official website https://www.uniswap.org.
  • Step 2 - In the top right corner, you will see the "Use Uniswap" button. Click on that button.
  • Step 3 - Once again in the top right corner, you will see "Connect Wallet". Use this button to select your wallet.
  • Step 4 - Now log into your cryptocurrency wallet and let it connect to the Uniswap platform.
  • Step 5 - After the wallet is connected, you will see an option to swap tokens directly. You can use the drop-down list next to the “to” and “from” sections.
  • Step 6 - Now you can select the digital coin you want to swap. Enter the amount you'd like to exchange and click "swap".
  • Step 7 - You will be presented with a preview screen so you can ensure all the details are correct. Once you are sure, confirm the transaction.
  • Step 8 - Now you will need to wait for the transaction to be processed and added to the Ethereum blockchain.

Does Uniswap Make Money?

As a project, Uniswap does not make any money. It is a decentralized exchange protocol operated by Paradigm which is a cryptocurrency hedge fund. All transactional costs go to liquidity providers who can claim them at any time. Founders of the project don't get any cut from the transaction fees. As of now, the transaction fee that is paid to LPs is 0.30% for every trade.

The fee is added to the liquidity pool automatically which can be redeemed by the LPs anytime they want. The fees distributed among LPs is proportional to their stake in the respective pool. In Uniswap v2, a percentage of fees may be deducted for Uniswap development.

Final Word

While conventional exchanges have promoted cryptocurrency investments and trading across the globe, they have also given birth to a major issue of centralization as they exercise complete control over their users' digital funds. That's exactly the problem that is being solved by Uniswap by offering a decentralized exchange platform where you buy and sell trades that aren't executed through an order book but through an automated liquidity protocol. Since the protocol is funded by a number of liquidity providers (LPs), no single entity or organization has full control over the funds.

Uniswap is still in its emergence phase but it has already become the fourth largest decentralized exchange with an average of $2 billion trade volume in 24 hours. Let’s see how the project founders build on the recent progress.