0% found this document useful (0 votes)
13 views9 pages

Trading ERC-20 Tokens on Uniswap

The document explains the differences between centralized (CEX) and decentralized exchanges (DEX) for trading cryptocurrencies, highlighting the control users have over their funds in DEX and the risks associated with CEX, such as hacking and exit scams. It focuses on Uniswap, a popular DEX that allows users to swap ERC-20 tokens and create liquidity pools, detailing how to use its features like swapping, sending, and pooling. The tutorial emphasizes the importance of connecting a wallet and ensuring correct token contract addresses to avoid losing funds.

Uploaded by

lora
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views9 pages

Trading ERC-20 Tokens on Uniswap

The document explains the differences between centralized (CEX) and decentralized exchanges (DEX) for trading cryptocurrencies, highlighting the control users have over their funds in DEX and the risks associated with CEX, such as hacking and exit scams. It focuses on Uniswap, a popular DEX that allows users to swap ERC-20 tokens and create liquidity pools, detailing how to use its features like swapping, sending, and pooling. The tutorial emphasizes the importance of connecting a wallet and ensuring correct token contract addresses to avoid losing funds.

Uploaded by

lora
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Exchanges

There are different types of exchanges where you can trade cryptocurrencies. Centralized
and decentralized are main two types. Biggest difference is that on decentralized exchange
(DEX) users have control of their funds while in centralized exchange (CEX) users need to
trust an exchange with funds. Because centralized exchanges holds a lot of money they are
great target for hackers. List of attacked exchanges is too big while there are probably some
exchanges that do not even know they were hacked. Another risk factor is that exchange
operators could decide to close an exchange and took all funds - so called exit scam. On
decentralized exchange (DEX) users holds funds in their own wallet or they send funds to
smart contract, but they can withdraw it anytime (if DEX is made correctly). Centralized
exchanges are more popular because they are faster and trading can be cheaper because
cryptocurrencies do not leave exchange wallet while trading on exchane. That resulted in less
liquidity on decentralized exchanges and if there is no liquidity there will not be much
trading. Uniswap exchange changed it because it works little different than other
decentralized exchanges. There are no buy and sell orders like on other exchanges, just a
price at which we can swap cryptocurrencies. Because it is a smart contract anyone can build
on top of it and some people created an option to set limit orders (UniswapEx for Uniswap
v1) but there is no need to use that. Simplified explanation is that price between two assets
are determined based on ratio of two tokens in the pool. Price of assets tends to track
market value because if price is incorrect users can perform arbitrage. Arbitrage is performed
if someone buy asset on one exchange and sell it on another exchange because difference in
price. Have in mind to cover transaction fee if you do that on Uniswap. That is why Uniswap
works best in combination of other markets.

More technical explanation of how it works is available at:


[Link]

There are two versions of Uniswap - v1 and v2. You can change it in upper right corner of the
website. This tutorial is for v2 but v1 works almost the same. For Uniswap v1 we can create
only token/ETH pairs, for Uniswap v2 we can create pools between different assets.

For example there is pair GRT-BSOV:


[Link]
exactAmount=1&inputCurrency=0x26946adA5eCb57f3A1F91605050Ce45c482C9Eb1&outpu
tCurrency=0xb83Cd8d39462B761bb0092437d38b37812dd80A2&theme=dark

(BSOV is deflationary on transfer, so you will have to set a slippage of 1% or more when you
are trying to Sell and Remove Liquidity. You can do this by clicking on “Show Advanced”.)
How to trade ERC-20 tokens on Uniswap

Uniswap enables anyone to create new markets, provide liquidity, and build financial
applications that could not have existed before.

To access the service, visit [Link]

There are two themes that you can change by clicking on bottom left button.
Uniswap offers three options:

- Swap – Swap any ERC-20 token for ETH or another ERC-20 token
- Send – Performs a swap where destination address is not the same as sending
address
- Pool – Join a pool and provide liquidity for any trading pair and enjoy a percentage of
trading fees in return.

First thing we need to do before using the services is to connect a wallet.

Click Connect Wallet (top right of the screen) and chose your preferred wallet from the list.

For this tutorial we will connect Uniswap with MetaMask wallet.

Select MetaMask on the list and click Connect to grant Uniswap permission to access your
MetaMask wallet.
Once your wallet is successfully connected you will see two fields in Swap tab:

- first one is ETH and displays your ETH balance you want to exchange
- second one has a button to select whichever token you want to swap to/from.

If you want to exchange token to ETH then click on arrow between pairs.

In this tutorial we will swap 1 GRT token to ETH.

Click the down arrow next to ETH and change token to GRT. Since GRT token is not yet listed
on Uniswap, we will need to select the token manually by copying and pasting GTR contract
address (0xb83Cd8d39462B761bb0092437d38b37812dd80A2) in Search Field.

Make sure to double check the contract address! If you use a wrong address, you may lose
your funds permanently!

Another option is direct link that will automatically chose GRT token:

[Link]

We will set the second option to ETH.


Enter amount of GRT you want to swap to ETH or amount of ETH you want to swap to GRT
and click Approve GRT.

If you want to update slippage tolerance or deadline, click Show Advanced and update the
settings.

Slippage tolerance means at what price change you still want to perform a swap. You also
need to set it if you are trading deflationary tokens.

Deadline means how much time you can wait. Defauld time is 20 minutes, if your transaction
is confirmed by Ethereum network after 20 minutes swap will not happn. It is good to change
deadline if you use low gas price. For information what gas price you should use check:
[Link]
Confirm transaction in MetaMask and wait for confirmation on blockchain.

Once transaction is confirmed you can click Swap.

Confirm swap and wait for transaction to confirm.

Once the transaction is confirmed you will receive a popup confirmation and your ETH balance will
automatically update.
Another option is Send.

Click Send tab and enter the amount of ETH you want to send and the recipients address and
click Send.

You can click on + Add a swap

Then continue same as before with option to chose different recipient address.
Third tab is Pool.

To join a pool click Join a pool.

Type GRT in Search field to display GRT pools and click Join to join the pool.
To join a pool you need to add liquidity with ETH and GRT in our example.

By joining a pool you increase liquidity of swap pair and in return you receive a share of
trading fees.

You can also check history of trading pairs:

[Link]

[Link]

You might also like