Professional Documents
Culture Documents
What Is Uniswap?: Decentralized Exchange
What Is Uniswap?: Decentralized Exchange
risk of hacking, mismanagement, and arbitrary fees. As such, decentralized exchanges also
have their own problems as they lack liquidity. It is where Uniswap Exchange comes into the
picture.
Uniswap is a decentralized exchange that aims to solve the liquidity issues where the
exchange is able to swap tokens without depending on the buyers and sellers who create that
liquidity.
Uniswap is one of Ethereum’s biggest wins right now and the project has a raft of new
inventions coming up in the future. Let’s go in-depth about what is Uniswap, how does it
work, how to use Uniswap, and much more.
What is Uniswap?
Uniswap is a Decentralized Exchange hosted on the Ethereum Blockchain as well as a public,
open-source front-end client. Uniswap exchange allows easy trading and listing of ERC20
tokens.
Uniswap allows the users to contribute to liquidity pools for any ERC20 tokens and get a
commission in the form of exchange fees for doing so. Uniswap exchange has two features
which are Swap and Pool.
The Swap feature of Uniswap allows users to swap Ethereum with different ERC-20 tokens.
The Pool feature allows users to earn through providing liquidity, wherein the tokens are
deposited into the smart contracts and the user will receive pool tokens in return.
When a trade is assisted by the pool, a 0.3% fee is distributed uniformly among the LP token
holders. If any liquidity provider wants to get their liquidity back, then they should their LP
tokens. Each token swap facilitated by a liquidity pool results in a price adjustment. This
mechanism is called the Automated Market Maker (AMM) and different protocols use
slightly different market maker algorithms.
Some DEX like Uniswap uses a constant product market maker algorithm which ensures that
the product of the quantities of the 2 supplied tokens always remains the same. So, a pool can
always provide liquidity irrespective of how large the trade is.
Source: Uniswap
In Uniswap exchange, anyone can be a liquidity provider for a pool just by depositing an
equivalent value of each token in return for pool tokens. These pairs in the Uniswap exchange
act as automated market makers to accept one token for another as long as the “constant
product” formula is preserved.
This constant product formula is expressed as x*y=k, which depicts that the trades must not
change the product (k) of a pair’s reserve balances (x&y). As k remains stable it is referred to
as the invariant.
Now let’s see how token swaps, liquidity pools, and smart contracts work in practice.
Smart Contracts: Individual smart contracts manage Uniswap trading pairs. They run in the
back-end. Each smart contract is responsible to manage a liquidity pool.
Liquidity Pools: Anyone can be a liquidity provider wherein they can create pair contracts
for any two ERC20 tokens. These liquidity providers can then deposit an equivalent amount
of ERC20 tokens in return for pool tokens.
Liquidity Tokens: Uniswap exchange mints the liquidity tokens to the liquidity provider’s
address. It is equivalent to the liquidity provider’s contribution to the pool. The liquidity
providers will burn the liquidity tokens to get rewarded in the form of fees paid by the trader.
The liquidity provider can then redeem any ERC20 asset at any time.
Trading: In Uniswap, trading is replaced with swapping. The users will specify the input and
output token of their interest. The amount of input tokens is also specified by them. Uniswap
will then evaluate the total amount of output tokens that the user will receive. Hence, the
swap takes place with just a click.
Uniswap Trading Fees: In the Uniswap exchange 0.30% of fees are applied to all trades.
This amount is divided as:
• 83.3% (0.25% of the amount traded) which goes to the liquidity providers.
• 16.6% (0.05% of the amount traded) which goes to the protocol.
1. Firstly, the user should install a Metamask (Web 3 Wallet). It is available to install as
a Google Chrome extension. All the trading process is carried out through this
decentralized wallet.
2. Then, the user should visit the Official website of Uniswap and click on Launch App.
3. After clicking the link, the user will be redirected to the Swap/Pool page. On visiting
the page, the user has to select the version of Uniswap. Version 2 is the most preferred
one.
4. Later, the user can install and connect their Metamask wallet to Uniswap exchange
using the “Connect to a wallet” option on the screen.
5. Connecting the MetaMask wallet to Uniswap.
6. Suppose the user wishes to Swap, then he/she should select the input token.
12. The user can then select the tokens of their wish to put in a pool.
13. Hence, Uniswap exchange is an easy and safe decentralized exchange platform.
The user should first visit the swap page of the exchange, which appears like the one below:
The user should click on the “Select a token” option.
There is a “Search name or paste address” option on the screen. Here, the user can paste in
the contract address of the ERC-20 token they would like to list.
For example, let’s say the user has minted 1 million B52 test tokens where the token address
can be found on etherscan.io as 0xc47828014f40322fc24d9c2340ef29d754d67cf4. Then, the
user will paste this address in the box and instantly find their 100,000 B52 tokens.
After selecting the token, there is a warning screen that appears on the screen.
After carefully reading the warning message, the user should click “I understand”. Now, the
user will land on the main Uniswap trading interface where there are two buttons “Swap” and
“Pool” appearing on the top. The user should then click on “Pool” and this screen appears:
The user should then press the “Add Liquidity” button. If prompted, the user should paste in
their token contract token address again and select the respective token in the dropdown
menu. Now, the page appears like this:
Now, the user should select the prominent token ratio set. After selecting the ration, the user
should approve Uniswap to handle the B52 tokens. Let’s say the user selects a ratio of 0.1
ETH and 50,000 B52 tokens as a demonstration and then click the “Approve B52” button.
Now, the user has to send a transaction so they need to press “Confirm” as prompted:
The final confirmation prompt will look like the one below:
Once the user is ready, he/she should press the “Create Pool & Supply” button, submit the
transaction and wait for it to go through. After its done, the liquidity pool will be created
resulting in the token being listed on the Uniswap exchange.
Now, the user can go to Uniswap’s “Pool” tab to visit the liquidity provider dashboard which
looks like the one below:
How do Uniswap pools work?
Uniswap is mainly known for its crypto native utility and a crypto native earning opportunity.
Uniswap’s liquidity pools consist of pools of tokens, wherein each token is secured by its
own smart contract. As Ethereum is the foundational infrastructure of Uniswap, users can
trade through these pools without any permission, 24*7, and without any account creation
requirements. The rewards for liquidity providers are their ability to earn a part of the given
Uniswap pool’s fees.
This dashboard will display metrics like total liquidity, 24-hour volume, 24-hour fees, and all
the transactions involved with the selected pool.
UNI token is airdropped to the users of uniswap exchange those made a transaction on
uniswap before 1 September. Every eligible user gets 400 UNI tokens. At the time of airdrop,
the UNI token is trading around $3 price that means users get approx. $1200 airdrop. If
someone holds the 400 UNI tokens, it's worth now $2600. The price of the UNI token is $6.5
(at the time of writing 19 September 2020).
UNI token is the native token of the Uniswap protocol. UNI token is a governance token and
the holder can vote for the best results. Users can make changes and modifications by using
their rights.
UNI holders are responsible for ensuring that governance decisions are made in compliance
with applicable laws and regulations. To help facilitate this, the fee switch has been
initialized to a contract UNI holder can use to vote on tokens for which they will collect fees.
The community is encouraged to consult knowledgeable legal and regulatory professionals
before implementing any specific proposal.
How is it unique from other exchanges?
• When compared to other decentralized exchanges, Uniswap offers various features
mainly for small traders.
• It has no listing fees, does not require any native tokens, and some of the cheapest gas
cost of any DEX.
• Uniswap is an open-source project on GitHub and is permission less which means any
individual can create any ERC market as long as they have an equal amount of ETH
to back it.
• Uniswap is the most active decentralized exchange among all and has also become the
de facto exchange for Defi tokens to be traded on the platform.
Disadvantages of Uniswap
• Uniswap tolerates technical risks that are associated with smart contracts as they can
be attacked or obstructed.
• Uniswap depends on arbitrage trading to constantly check the exchange rate, so, there
will be a need for other forms of exchange to keep the rates balanced.
• Gas fees are required to be spent to perform swaps. As Ethereum scales, these gas
prices will reduce gradually and become a non-issue.
• Uniswap is still under development and their documentation is yet to be completed.
Future of Uniswap
Uniswap is an open protocol of smart contracts where anyone can build a front-end user
interface on top of it. For instance, InstaDApp allows the users to add funds into the Uniswap
pools without the need for any access to the official Uniswap UI.
New interfaces such as DeFiZap allows users to add funds to the Uniswap pools using only
ETH. The UI also offers simple one-click solutions for purchasing pool tokens in
combination with bZx token strategies.
Final Word
Uniswap is reaching greater heights and its stats are proof. At the time of writing, Uniswap
powered approx $1,061,216,824 in daily trading volume. If the decentralized exchange can
raise so rapidly, then it has a bright future. In the coming days, it will be interesting to see if
Uniswap will gain traction as it gained in the last year.
Thank You