Your resource for web content, online publishing
and the distribution of digital products.
S M T W T F S
 
 
 
 
 
1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
 
 
 
 
 
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 

A Guide to Uniswap | Is it Safe to use a DeX?

DATE POSTED:September 26, 2024

For years, a vast amount of crypto trading has occurred on centralized exchanges like Coinbase and Binance. They provide quick settlement, huge trade volumes, in addition to high liquidity.

The DeFi ecosystem intends to replace these centralized intermediaries in financial applications like loans, insurance, and derivatives by using decentralized, non-custodial financial products. Uniswap is one such example.

According to CoinMarketCap’s DeFi tracker, Uniswap has the highest market capitalization as of August 2021. In this article, we will also get a complete understanding of Uniswap.

Uniswap Features
  • First of all, Uniswap is open-source, which means that anybody may copy the code and use it to build their decentralized exchange.
  • Furthermore, it also allows users to list tokens for free on the market, whereas Centralized exchanges are profit-driven and demand listing fees for new currencies.
  • Users retain control of their funds at all times. As opposed to centralized exchanges, that requires users to hand over control of their private keys so that orders can be logged on an internal database rather than executed on a blockchain, which is more time consuming and expensive.
  • It avoids the danger of losing our cryptos by holding private keys during cyberattacks on exchanges.
UniswapUniswap History of Uniswap 2018 2020
  • Uniswap’s website was momentarily taken down in April, 2020. It was due to an attack when hackers failed to use a reentrancy attack on the exchange.
  • Version 2 was released in the market on May, 2020 .
  • In October 2020, Uniswap’s average daily trading volume was $220 million.
2021
  • Version 3 which was released in May, 2021, came with new choices for allocating liquidity within a specific price range.
How to use Uniswap?

Uniswap allows us to buy ETH and thousands of ERC20 tokens offered by the platform. Further in this section, we will understand how to use Uniswap.

Step 1: Ethereum Wallet and ETH

Firstly, we need an Ethereum Wallet like MetaMask, Trust Wallet etc. and add some ETH.

A Guide to Uniswap | Is it Safe to use a DeX?Ethereum Wallet Step 2: Uniswap App

Secondly, go to the Uniswap interface. Then, click the Connect to a wallet option in the upper right corner and log in with the wallet.

Connect to WalletConnect to Wallet Step 3: Choosing Tokens

Choose the token you want to trade from the drop-down menu and choose the token you want to swap it for.

Step 4: Swapping

Enter the amount and press the swap button.

Step 5: Conclusion

Lastly, a transaction preview window will open, and we will need to confirm the transaction on our ERC-20 wallet. Our tokens will then appear in our ERC20 wallet. We can track its progress by copying and entering the transaction ID into Etherscan. We can find the transaction ID in the wallet by searching for the transaction in the transaction history.

How does Uniswap Work? Problems in Centralized exchanges
  • A single authority administers Centralised exchanges. They require customers to place funds under their custody and trade using a typical order book mechanism.
  • Order book trading: List all open orders for a specific trading pair currently available on an exchange.
  • For example, if we want to sell one BTC at $45,000 on a centralized exchange, we would have to wait for a buyer to arrive on the other side of the order book who wants to acquire an equal or greater amount of BTC at that price.
  • Liquidity is the major issue with this sort of system. Traders may not be able to fulfil their buy or sell orders if liquidity is low.
Solutions By Uniswap
  • Firstly, the automated liquidity protocol used by Uniswap overcomes the liquidity problem of centralized exchanges. It employs a Constant Product Market Maker design, a variation of the Automated Market Maker concept (AMM).
  • Automated Market Makers: Are the smart contracts that maintain liquidity reserves (or liquidity pools) that traders may trade against. Liquidity providers fund these reserves accordingly.
  • Anyone can become a liquidity provider by depositing the two tokens in the pool. In exchange, traders pay a fee to the pool. Which is subsequently allocated among liquidity providers based on their pool share.
  • Liquidity providers establish a market by depositing the equivalent of two tokens. For example, these might be ETH and an ERC-20 token or two ERC-20 tokens. Pools are typically made up of stablecoins like DAI, USDC, or USDT. In exchange, liquidity providers receive liquidity tokens that reflect their share of the overall liquidity pool.
  • For example, if we look at the ETH/USDT liquidity pool. We’ll also refer to the ETH component of the pool as x and the USDT portion as y. Uniswap multiplies these two figures to determine the overall liquidity in the pool. Let us refer to this as k. k must remain constant likewise, implying that the overall liquidity in the pool remains constant.
  • For example, Assume Alice purchases 1 ETH for 1000 USDT from the ETH/USDT liquidity pool. By doing so, she raises the USDT component of the pool while decreasing the ETH portion. This essentially indicates that the price of ETH rises. After the transaction, there is less ETH in the pool, and we know that the overall liquidity (k) must remain constant. This process determines the price.
LiquidityLiquidity Smart Contracts on Uniswap
  • Uniswap is made up of two smart contracts, namely; an Exchange contract and a Factory contract. These are the computer programmes which do specific tasks when certain circumstances are fulfilled.
  • Exchange contract: Users can swap against a pool of a particular token and Ether held via these contracts.
  • Factory contract: It is in charge of producing new Exchange contracts and registering the ERC20 token address to its Exchange contract address.
Smart Contracts on UniswapSmart Contracts on Uniswap
  • No listing costs are applicable for adding a token in Uniswap so that everyone can execute a function to register a new token in the factory contract.
Factory ContractsFactory Contracts
  • Someone first used DAI’s contract address to call the create Exchange function in the Factory contract. The Factory contract then checks its registry, to see whether an Exchange contract for that token address has been created or not. If no Exchange addresses are specified, the factory contract deploys an Exchange contract and stores the Exchange address in its registry.
Upgrades at Uniswap Uniswap V2:
  • Released on May, 2020, a substantial improvement was included in it which allowed direct ERC20 to ERC20 swaps. Removing the requirement for ETH to be one of the two assets in a liquidity pool.
  • Moreover, it lowers the total number of transactions and the related gas costs.
  • Introduced support for ERC20 tokens that are incompatible with one other, such as OmiseGo (OMG) and Tether (USDT).
Uniswap V3:
  • Launched on the layer 1 (L1) Ethereum mainnet in May 2021. It was followed by the layer 2 (L2) deployment on Optimism.
  • Uniswap V3 was released at a time when Uniswap had established itself as a significant infrastructure and liquidity provider in the DeFi sector. With an ecosystem of tools that empowers developers, traders, and liquidity providers.

Its features are as follows:

  1. Concentrated liquidity: It allows liquidity providers to allocate liquidity within a predefined price range. As a result, traders don’t have to risk high capital to obtain results.
  2. Fee Tiers: It allows traders to evaluate their risk on a better level when trading volatile assets. It might vary in price between the time a deal is launched and when it is completed.
  3. Oracles: It also includes simpler and less expensive oracles. It ensures that the DEX’s data is updated.
  4. NFTs: Because each depositor may specify their price range, the Uniswap LP position is unique. As a result, each LP position now has its non-fungible token (NFT).
Uswap (UNI Token) Tokenomics Introduction:
  • Firstly, UNI is the Uniswap protocol’s native token.
  • Secondly, it grants its holders governance powers which imply that holders of UNI can vote on protocol modifications.
  • Lastly, Uniswap developed the UNI coin in September 2020 to prevent consumers from switching to DEX SushiSwap, a competitor. SushiSwap decided to move $1 billion of money away from Uniswap to its DEX platform. It was termed a vampire mining attack, i.e. impacting overall liquidity levels.
Supply:
  • Total Supply is 1 billion which are made available for 4 years.
  • Following which Uniswap will implement a 2% annual inflation rate to ensure network participation.
Distribution:

The distribution of the tokens is as follows:

  1. 60 per cent to Uniswap community members, i.e. users
  2. 21.51 per cent to team members
  3. 17.8 per cent to investors
  4. 0.69 per cent to advisers.
  • 15% of the majority of the funds that were planned to be distributed to consumers. They can be claimed by the ones who utilized Uniswap before September 1, 2020 .
  • Liquidity mining accounts for a portion of the community distribution. This implies that people who supply liquidity to the following Uniswap pools will get UNI: ETH/USDT, ETH/USDC, ETH/DAI and ETH/WBTC.
Procedure to claim UNI:

In this section, we will understand how to claim our UNI on Uniswap.

  • Step 1: Uniswap App

Firstly, go to the Uniswap interface. Then, click the Connect to a wallet option in the upper right corner and log in with the wallet. Use the wallet with which we have used Uniswap before.

  • Step 2: Claim and Confirm

Claim UNI tokens by clicking Claim your UNI tokens.

Then, check the wallet to confirm the transaction.

Claiming Uniswap TokenClaiming Uniswap Token Conclusion

Uniswap enables anybody with an Ethereum wallet to trade tokens without requiring the intervention of a third party. Furthermore, it is one of the most popular decentralised exchanges. And since we are seeing a rapid transaction of traders from centralised exchanges to decentralised exchanges, it gets pretty important to first learn about these platforms.

Also, read