A One-Stop Shop: Your Guide to Using Uniswap
A One-Stop Shop: Your Guide to Using Uniswap

A One-Stop Shop: Your Guide to Using Uniswap

Uniswap is the grandaddy of decentralized exchanges. Here's your guide to trading crypto on Uniswap.

Crypto

Crypto

DeFi

DeFi

Getting Started

Getting Started

The advent of decentralized exchanges (DEXs) isn't exactly news, but if you're looking to trade crypto without dealing with order books and bloated centralized platforms, you might want to invest in DeFi.

As a civically involved DeFi denizen, it's crucial that you understand each proposal before carefully selecting your vote.

Say "hello" to Uniswap. Here's everything you need to know to get started with the founding father of automated market maker (AMM) protocols.

What is Uniswap?

Uniswap DEX

Centralized Exchange

  • Facilitated by smart contracts & liquidity provers
  • Automated Market Maker formula determines price
  • Executing trade requires liquidity pool
  • Liquidity providers risk divergent loss
  • Only works with ETH & ERC-20 tokens
  • Facilitated by central party
  • Order book determines price 
  • Executing trade requires counterparty
  • Central party assumes limited risk
  • Can work with any crypto

Uniswap is the first AMM protocol that enables trading between two cryptos without a central party facilitating it. Uniswap uses smart contracts on Ethereum and EVM-compatible blockchains to create liquidity pools into which anyone can deposit an equal dollar amount of two cryptocurrencies, and those liquidity pools allow traders to freely swap ETH or any other pair of ERC-20 assets.

Uniswap App functions:

  • Swap: Trade one crypto for another crypto
  • Pool: Deposit an equal dollar amount of two cryptos and receive a liquidity pool token
  • Vote: Approve or reject proposals to change the protocol using the UNI governance token

Uniswap V1

The original version of Uniswap introduced two main functions: swap and pool. Compared to centralized exchanges like Coinbase and Kraken, Uniswap is highly competitive because of its low trading fees (usually 0.3%) as well as its alignment with the core crypto principle of decentralization. 

One drawback of Uniswap V1 was that it only enabled trading ETH with any ERC-20 asset. This meant swapping between two ERC-20 assets required an interaction with two separate liquidity pools, which is inefficient. Additionally, Uniswap needed to address exploits such as flash loans and flash swaps that could be used to manipulate the protocol's price oracles and create profitable arbitrage opportunities.

Uniswap V2 

The first in a succession of upgrades to the protocol is Uniswap V2—an updated version of the original smart contract that makes trading ERC-20 token pairs more efficient by enabling the creation of liquidity pools that don't require ETH. This means that instead of having to use ETH as a medium of exchange for crypto swaps, liquidity providers can instead pair their ERC-20 tokens of choice.

For example, if you wanted to trade DAI for wrapped Bitcoin (wBTC) on Uniswap V1, you would first need to transact with the DAI-ETH pool to exchange DAI for ETH and then utilize the wBTC-ETH pool to trade ETH for wBTC. Uniswap V2 eliminated the need for this by allowing liquidity providers to deposit any pair of ERC-20 tokens to create, for instance, a DAI-wBTC pool where traders can swap between the two cryptos in a single exchange.

Uniswap V3

Uniswap V3 is the latest version of the protocol, and it enables a feature called concentrated liquidity. In old versions of the Uniswap protocol, depositing liquidity was risky because the pair of cryptos that was lent to the protocol could be traded across all price ranges. Since liquidity providers must deposit an equal dollar amount of each crypto, this meant that the value of the liquidity pair could change if the price of one token went up or down relative to the other.

Concentrated liquidity

Concentrated liquidity in Uniswap V3 allows liquidity providers to curtail risk by enabling their liquidity pair to be traded only within a certain price range. One way to view concentrated liquidity is essentially as a stop loss and limit buy feature where the AMM algorithm sells one asset if the price goes too low or buys the asset if the price goes too high. If the price meets one of the parameters set by the liquidity provider, the deposited liquidity pair will consist only of one token.

Do not pass 'Go' and do not collect $200

Although concentrated liquidity can reduce the risk taken on by liquidity providers, it can also be detrimental to the total value of the deposited liquidity pair since it gives the algorithm permission to buy high and sell low in order to keep the price of one asset within the desired parameters.

Another negative aspect of this feature is that providing liquidity becomes a poorer source of passive income and more of a hands-on investment since, if the liquidity pair falls outside of the desired price range, it ceases to be utilized in crypto swaps. Hence, it stops collecting the 0.3% fee that incentivizes liquidity providers to deposit into the protocol in the first place.

Uniswap crypto exchange

Uniswap's intuitive interface makes it one of the easiest Web 3.0 applications to interact with. In fact, the fundamental design of Uniswap is so awesome that tons of copycat protocols contain basically the same code—such as Pancakeswap, Sushiswap, Quickswap, and over 200 others. However, it's important to note that these copycats or 'forks' of Uniswap are slightly altered versions of Uniswap V2, so to use the latest version of the protocol, you must use the Uniswap app.

Uniswap app

A Web 3.0 enabled browser and DeFi browser wallet are required to use the Uniswap app. So, you must enter the Uniswap app client using a browser like Chrome or Brave and install your Web3 browser extension wallet of choice, such as Metamask. Next, to enter the Uniswap app you must type app.uniswap.org in your browser's address bar. To begin using the Uniswap app, you must click 'connect wallet' in the top right-hand corner and approve your browser extension wallet to use the app.

Compatible Networks

  • Ethereum
  • Polygon (Sidechain)
  • Optimism (ZK solution)
  • Arbitrum (ZK solution)

How to use Uniswap app

The three main functions of Uniswap are swapping, which is trading one token for another; Pooling, which is providing an equal dollar amount of two cryptos to serve as the protocol's liquidity; and voting, which means influencing the protocol by being for or against proposals created by the Uniswap community.
 

Swapping

Once connected to the Uniswap app, users are automatically directed to the swap page, but you can also click 'swap' on the top left. The simplistic interface shows two cryptos, the asset you want to sell at the top and the asset you want to receive at the bottom. You must select each asset or enter the token address and then enter the amount you want to trade. 

Network fee

After selecting the pair of cryptos you want to trade, an exchange rate, as well as other parameters like network fee, price impact, and slippage, will appear below. First, the network fee is the price of processing the transaction on the blockchain—this is known as 'gas' on the Ethereum network. Network fees vary because they depend on the volume of transactions being processed by the network at the current moment.

Price impact

Second, the price impact is how much your individual swap will impact the value of the liquidity pool. This is calculated by the size of the liquidity pool vs the size of your trade, so large swaps or swaps within smaller pools with less liquidity will incur a higher price impact. This can be avoided by trading in a large liquidity pool relative to the volume of crypto you want to trade.

Slippage

Finally, slippage is the least controllable factor since it accounts for changes in the crypto's price while your transaction is being processed. This could mean the value of the crypto being traded can become higher or lower than when the swap was initiated. Slippage depends on volatility as well as the market capitalization of the currency being traded, so trading smaller-cap altcoins will incur more slippage since small trades are more likely to impact the market for those cryptos.

Providing Liquidity

Another feature of the Uniswap app is pooling, or depositing a pair of two cryptos into the protocol to enable traders to utilize that liquidity to swap cryptos. By selecting 'pool' at the top menu bar of the Uniswap app, you'll arrive at a page where you can select two cryptos to deposit into the protocol. 

After selecting the cryptos you want to deposit, you can select a fee tier or the percentage of each trade you want to collect each time a swap is facilitated using your liquidity pool. The majority of liquidity providers will choose to collect a 0.3% fee since it's reasonably low and common for most pairs.

Next, to provide liquidity, choose the amount of crypto you want to deposit and select the price range at which you want the pair to be traded. Liquidity providers are required to deposit an equal dollar amount of each crypto so that the initial proportion of the value of the pair is 1:1. 

The last step is approving the Uniswap app's access to your cryptos and signing the transaction to deposit your cryptos using your browser extension wallet. After the transaction is processed you will receive a liquidity pool (LP) token that is a proportional representation of your crypto pair in the liquidity pool.

Uniswap token

Users who hold the UNI token are able to influence changes to the protocol using the Vote feature. Each UNI represents one vote, so your voting power is proportional to the number of UNI tokens you hold in your wallet. To vote on proposals, you just click 'vote' at the top menu bar, select an open proposal you want to vote on, and then select either 'for' or 'against.'

To submit your vote you must sign transactions and may have to pay a gas fee in order for it to be processed. Proposals must have 40 million votes in favor to gain approval or be 'executed,' while those that don't meet that threshold are 'defeated.' Otherwise, proposals that garner an approximately equal number of votes 'for' and 'against' are 'canceled.' As civically involved DeFi denizen it's crucial that you understand each proposal before carefully selecting your vote.

Risks for liquidity providers

While liquidity providers reap the benefits of traders swapping cryptos back and forth, this isn't without risk. While changes in price have an acute impact on traders, this is much more strongly felt by liquidity providers since they remain exposed to two assets that must always be proportionally equal in value according to the protocol's AMM algorithm. 

Divergent loss

While many refer to losses accrued by liquidity providers caused by changes in the price of one crypto relative to the other as 'impermanent loss,' a better term is 'divergent loss,' since the phenomenon refers to lost value caused by a divergence in the price of one crypto relative to the other crypto in a liquidity pair. While Unswap V3's 'set price range' feature can somewhat alleviate the risk of divergent loss, it still remains while depositing liquidity within any significant price range.