Uniswap and other DeFi protocols are experimental works in progress. Funds deposited into Uniswap or DeFi protocols in general can be at risk of smart contract vulnerabilities, malicious developers and hacks. Uniswap is governed by token holders through a DAO (decentralised autonomous organisation).
Finder is committed to editorial independence. While we receive compensation when you click links to partners, they do not influence our content.
Uniswap beginner’s guide: How to trade and provide liquidity
Learn how to use Curve.fi for trading, providing liquidity and earning interest.
Uniswap is one of the largest decentralised exchanges (DEXs) in the cryptocurrency industry. It runs on Ethereum and allows you to exchange any ERC-20 tokens using an Automated Market Maker protocol (AMM) instead of a standard spot market order book.
This guide will teach you how to use uniswap, trade in and out of pools, provide liquidity in return for rewards, and make you aware of the risks involved throughout.
What is Uniswap Exchange?
Uniswap works by incentivizing liquidity providers to provide collateral and make liquidity pools. Traders then use these liquidity pools to trade, instead of trying to find a matching buyer or seller on the spot market.
- Liquidity providers. Users who lend their cryptocurrency to an AMM for people to trade with, in return for earning interest and other rewards. Liquidity providers receive liquidity provider tokens (LPTs) in return for their deposits, which acts as a coupon letting them redeem their funds at any time, plus rewards.
- Liquidity pools. A pool of two cryptocurrencies (for example, ETH-USDC), allowing traders to trade in and out of the pool without needing another person on the other side of the trade.
The software used to run the exchange without an order book is a design known as an Automated Market Maker (AMM) model. This model relies on a mathematical formula to price assets instead of using an order book. AMMs are smart contracts that hold liquidity pools that you can trade against. Liquidity providers fund liquidity pools. Anyone who deposits an equivalent value of two ERC-20 tokens into the pool can become a liquidity provider for the protocol.
The difference between centralised cryptocurrency exchanges like Binance and Coinbase and a decentralised AMM cryptocurrency exchange like Uniswap is that there is no order book or a centralised party that facilitates the trades with the latter. Furthermore, there is no listing process for ERC-20 tokens on Uniswap due to its decentralised nature, and this enables the launch of any token if there is a liquidity pool for the traders. Thus, there are no listing fees for ERC 20 tokens as well.
The protocol was launched in late 2018 by creator Hayden Adams, who is a software developer. His inspiration to design the protocol arises from a post that came from Ethereum co-founder Vitalik Buterin. Uniswap is currently running the v3 design of its platform, with the latest update coming in May 2021, which mainly improves capital efficiency of the liquidity pools, which is a recurring issue with yield farming protocols.
There is no listing process for ERC 20 tokens on this exchange due to its decentralised nature, and this enables the launch of any token if there is a liquidity pool for the traders. Thus, there are no listing fees for ERC 20 tokens as well.
How to trade on Uniswap
To trade on Uniswap, you need to have ETH or any other ERC-20 standard token. These tokens can then be traded through Metamask's wallet. Metamask is a browser plugin that is used as an Ethereum wallet. It allows you to run dApps without participating in the Ethereum network as an Ethereum node.
What sets it apart from other wallets you might have heard of is the fact that it allows you to interact with dApps directly from your wallet. Other compatible wallets are Coinbase Wallet, Trust Wallet, Formatic, Portis Wallet, and any wallet compatible with WalletConnect.
Trading on Uniswap is done in four simple steps:
- Connect your wallet. Connect to Uniswap using a wallet like Metamask.
- Choose the token pair. You can search and choose from a dropdown of available ERC-20 tokens on the "Swap" section of the website. You will need to choose both the token you are selling (the "From" field), as well as the one you want to buy (the "To" field).
- Review settings. Experienced traders may want to take advantage of the settings icon in the top left corner of the Swap interface. You can set things such as slippage tolerance and maximum trade time.
- Swap. Click "Swap" and the transaction will be previewed in a pop-up, allowing you to review the order (including Uniswap fees). You will then need to confirm a second pop-up, this time through your wallet (which will include Ethereum gas fees). After confirmation, the AMM model completes the rest of the transaction on the Ethereum blockchain and you receive your new tokens into your wallet automatically. You can always track the progress of your transaction on the Etherscan.io blockchain explorer using the transaction ID or your wallet address.
Slippage tolerance is an aspect you need to be aware of before using Uniswap and similar DeFi protocols. Slippage is the variance between the expected price of the swap and the actual execution price of the swap. Thus, slippage tolerance is the change in price (as a percentage) from the expected price you are willing to accept. Although slippage can occur for a number of reasons, it has the highest chance of happening when there is a high level of volatility in the market.
For example, if the quoted price on a trade for 1 ETH is 3,000 USDC, then a slippage tolerance of 1% would mean the price could fluctuate in either direction by up to 30 USDC (1% of 3,000). You could end up with as much as 3,030 USDC, or as little as 2,970 USDC for that trade.
Slippage tolerance allows you to set the range of price movement you are willing to accept before the trade doesn't execute, as a result of not adhering to the set tolerance levels (the price deviated too far from the price you were willing to accept). Tolerance is calculated as a percentage of the amount of tokens you are willing to receive.
Another setting to keep in mind is the transaction deadline which can also be chosen in the Swap settings. It indicates the maximum amount of time you're willing to wait for the pending Swap to execute. If the time elapsed exceeds the transaction deadline, then the swap is reversed automatically. It is another fail-safe feature built into the interface.
The price impact conveys an approximation of the expected slippage based on the size of your order or what's really happening in the market.
Both slippage tolerance and the transaction deadline can be adjusted using the settings button in the top right corner of the Swap window (the cog icon).
Risks of trading on Uniswap
Despite the simplicity with which you can trade ERC 20 tokens on Uniswap, there are certain risks attached with trading on Uniswap:
- Smart Contract Risk. Inherently, smart contracts are not foolproof innovations in technology. There is always a technical risk attached to smart contracts. Since it is the central point for the ecosystem, it also becomes a lucrative attack point for hackers and other such scrupulous players in the ecosystem. There are chances of fake smart contracts being created as well since Uniswap allows anyone to create an ERC20 token and add it to the platform.
- Slippage. As mentioned earlier, there is a chance of slippage occurring in various swaps depending on the market conditions. Although this can be limited using the slippage tolerance, it also restricts your ability to make profits, especially in high volatile scenarios.
- Incentive Failure Risk. Smart contracts are usually structured in a way that incentivizes the good behavior of participants of the protocol. Sometimes these incentives are not enough to encourage such behavior, thus leading to a risk of other uses facing financial losses as in the case of a rug pull or exploit.
- Gas fees. The Ethereum blockchain has been plagued with high gas fees for quite some time now. Although this should improve with the migration to Uniswap v3.
How to provide liquidity on Uniswap
Once you have connected your wallet to the Uniswap interface, you can access the liquidity features of the protocol through the "Pool" section of the website. In this section, you can either add liquidity to an existing pool using the "Add Liquidity" feature or create a new liquidity pool for a particular token pair using the "Create a pair" feature.
Most people will just want to add liquidity to an existing pool, so we've outlined the steps for you to add liquidity to Uniswap below.
- Go to the "Pool" tab and click on the "Add Liquidity" button.
- Choose the token pair you would like to add liquidity to (for example, ETH and USDC).
- Once the tokens are selected, enter the number of tokens you would like to add for one half of the pair (for example, 2 ETH). Entering an amount on either of the pair will auto-fill the other with an equivalent amount of the second token. This is because the value of the two deposits needs to match.
- You will also be able to see your share in that particular liquidity pool before you can click on "Add Liquidity" to go ahead with the transaction.
- Click on transaction details if you would like to see more information about the transaction, such as the proportional liquidity tokens that will be minted to this stake in the pool.
- Confirm the transaction through your wallet, where you can adjust the gas fees. Then wait for the smart contract to execute the transaction. Your new liquidity provider tokens will automatically be sent to your wallet.
As a reward for providing liquidity to the protocol, you will be rewarded 0.3% of all the trades with this pair in proportion to your allocated share in the pool. The rewards can be claimed by withdrawing liquidity and will keep accruing in real time in the pool until that time.
Once liquidity is added to a pool, you get liquidity tokens which are minted and sent to your wallet. They are a representation of your contribution to the pool as they are distributed in proportion to your share in the pool. These tokens represent the fees earned by the protocol for fees on trades.
How to withdraw funds from a liquidity pool
Below are the steps you would need to follow to remove liquidity from Uniswap:
- First, you need to click on "Pool" on the platform, followed by the token pair you wish to withdraw your liquidity stake from.
- Click on the "Remove Liquidity" button.
- Confirm this decision to remove liquidity.
- Then you would need to confirm the transaction on your wallet.
- After this, the protocol proceeds to remove your liquidity from the pool after a final confirmation.
Impermanent loss explained
Although liquidity mining provides a good opportunity for you to create passive income, in addition to the risks mentioned for trading on the DEX, there is one main risk attached to providing liquidity on Uniswap:
- Impermanent Loss. In simple terms, an impermanent loss is a loss that may be caused by holding tokens in an AMM as compared to holding tokens in your wallet. Because the pool needs the value of both tokens to remain balanced, any change in the price of one token will cause a change in the balance of the pool. As such, you may exit the pool with more (or less) of one token than the other. Depending on how the market moved, this may result in a loss.
How liquidity pools are calculated
The Uniswap AMM model uses a formula to calculate and balance liquidity on the platform:
x * y = k
- x = the portion of the pool for token 1
- y = the portion of the pool for token 2
- k = total liquidity of the pool
For example, in an ETH/DAI pool, "x" is the ETH portion of the pool, and "y" refers to the DAI portion of the pool. "k" is a fixable constant and refers to the total liquidity of the pool. The core of the AMM model is that the total liquidity of the pool (k) remains fixed so as to minimize price variations. Market incentives are used to ensure users top up either side of the pair to keep the pool balanced.
What does the UNI token do?
UNI is the native token of the Uniswap protocol, which gives holders voting rights to the platform's governance.
Uniswap distributed the token through an airdrop of 400 UNI tokens to each wallet address that had interacted with the exchange before September 2020. One billion UNI tokens were minted during the genesis. Over time, 60% will be distributed amongst the existing members of the community, and 40% is reserved for team members of the protocol, which will be distributed over four years.
A portion of UNI tokens are distributed through liquidity mining.
Pros and cons of Uniswap
Let's take a look at the pros and cons of using Uniswap for both trading and for staking coins as a liquidity provider.
- It stays true to the decentralised values with which the cryptocurrency ecosystem was originally created, thus being a huge attraction for purists. It helps to distribute the power and control that centralised exchanges have.
- It adds liquidity to the coins in the participating markets.
- Higher privacy protection than centralised trading exchanges as there are no KYC requirements.
- The ability to generate passive income by simply adding funds to the liquidity pool.
- Considered more secure than CEXs as you can trade from your own wallet and not the exchange's wallet. Here you have self custody of your cryptocurrency assets.
- Easy and free token listing.
- Since there is no interaction with oracles for real-world data, the chances of hacks are decreased.
- Erratic gas fees depending on network congestion.
- Failed transactions due to low gas settings leading to expenses.
- Be aware that because anyone can list a token on Uniswap, some tokens listed on the exchange exist purely to scam users. Such tokens often appear with little background development or information, and promise great things. Once trading reaches a desirable level, the token creator may then dump all the coins (causing the price to crash) or steal any funds deposited into the protocol (known as a rug pull).
More guides on Finder
Finder Global Crypto Trading Platform Awards 2023
Find out how major crypto exchanges and brokers fared in 2023’s Global Crypto Trading Platform Awards.
How to buy Credit Suisse Group (CS) shares
Steps to owning and managing Credit Suisse Group, with 24-hour and historical pricing before you buy.
Coinbase statistics 2023
See our visualised stats on Coinbase’s users base, trading volume, revenue and income.
RBNZ Survey: Almost all experts confident the OCR will rise to 4.75%
Kiwi homeowners should brace for yet another increase to the cash rate, according to this month’s Finder RBNZ Official Cash Rate Survey.
You can now pay IRD taxes with an Amex card and earn points
SPONSORED: Want more from your business tax payments? Here’s how to pay with RewardPay and score extra points.
Best way to transfer large amounts of money internationally
What are the best options for sending or receiving a large amount of money overseas? Read this $50,000 example with exchange rates and fees comparison.
Falling out of love: Only 1 in 4 Kiwis plan to celebrate this Valentine’s Day
Kiwis celebrating Valentine’s Day in 2023 will spend on average $189 on their special someone – totalling $181 million nationally, according to research from global comparison site Finder.
S&P 500 snaps winning streak ahead of the next Fed update
Stocks snapped a strong January rally as investors look towards a busy week on the market.
Ledger Nano S Plus vs Ledger Nano X
Learn about the similarities and differences between Ledger’s two crypto hardware wallets.
Ask an Expert