Top 5 things to be aware of on Uniswap

CryptoShine
9 min readDec 11, 2020

Uniswap is a decentralised exchange also known as a DEX. Its called an automated market maker (AMM) because there are no intermediaries involved unlike a centralized exchange. In case of any issue, you cannot reach out to a customer support team to resolve it. So you have to be very cautious while doing any sort of trade there. Be mindful of this.

In 2020, DeFi (Decentralized Finance) has seen an explosive growth and numerous new projects have appeared in the DeFi space. Most of the projects are ERC-20 tokens which operate on top of the Ethereum blockchain. They get listed on Uniswap upon token launch even before getting listed on centralized exchanges. Some tokens can be exclusively found only on Uniswap.

This is why, sooner or later, users in the crypto currency space need to get familiar with Uniswap. Unlike centralized exchanges, there are a lot of aspects of Uniswap which can be surprising or even daunting for a newbie user. Some of the common pitfalls can even cause you to lose all your tokens.

The motivation of this article is to introduce you — the reader, to the common pitfalls and the points to be cautious about while using Uniswap. At the end of this article, you will be more aware of how to use Uniswap effectively without falling for common mistakes or attacks.

#1: Always verify the Token contract address before trading

So you want to swap your tokens with another token on Uniswap? Before you do that, please ensure that you have verified the contract address of the token you want to buy to ensure that it is correct.

Each token has a unique contract address associated with it. All transactions (buy and sell) are done using this contract address. Contract addresses follow a format similar to an Ethereum account address. You must verify this address against the official source of the project. The source could either be the official website of the project, their whitepaper, or their official communication group (usually Telegram or Discord). In a chat group, the information should be accepted as correct only if its verified by the administrator of the official group. The address of official chat groups are mentioned on the official website of the project.

You need to be aware that in official chat groups, there are certain malicious users who pretend to be administrators or moderators. They might contact you through private messages to offer you help or bonus profits with an intention to scam you, do not communicate with them.

Few other places to check this information is the official listing of the token on sites such as coinmarketcap.com and coingecko.com

To understand this better, let’s take Polkastarter project as an example.

We can find the correct contract address at the following locations for this Project.

Official site: https://www.polkastarter.com/

They have displayed the contract address on their site as shown below.

Each site has a different way of letting the users know about their official smart contract address.

Coinmarketcap: https://coinmarketcap.com/currencies/polkastarter/

Coinmarketcap displays the Ethereum contract address as highlighted in the image below.

Coingecko: https://www.coingecko.com/en/coins/polkastarter

In the case of Coingecko, you can find the contract address as shown below:

Telegram official channel: https://web.telegram.org/#/im?p=@polkastarter

If you want to be extra cautious, you can use multiple sources (such as the ones listed above) to verify the contract address.

Why is it important to verify contract address?

Firstly, if you use an incorrect contract address, you will lose your tokens which you used to swap. Transactions in blockchain are irreversible.

Hackers often create malicious smart contracts which spoof the name of a legitimate token and list it on Uniswap. If you are only using the token name to search for a token on Uniswap, then chances are that you might run into a fake listing of the token which is spoofing the legitimate token.

Examples

A very good example of how hackers use this method to steal tokens from naive users is the most recent token launch of Bondly. This token got listed on Uniswap in the second week of December 2020. The exact time of the launch was not made public by the project owners. On the day of launch, hackers listed multiple fake tokens on Uniswap with the same name “Bondly”. This led some naive users to believe that these fake tokens were legitimate. A lot of users lost their crypto tokens by sending them to the malicious smart contract which was spoofing Bondly.

Similar events also happen at the time of Token launch for other projects and its becoming a common occurrence.

#2: Use appropriate Ethereum gas fee

Each time you perform an action on the Ethereum blockchain, it requires a gas fee. Think of it as an incentive for the nodes which are responsible for keeping the Ethereum network secure.

Since gas fee is an incentive for the nodes, this means that the probability of your transaction to get confirmed is directly proportional to the amount of gas fee you use.

The higher the gas fee, the faster the transaction gets confirmed.

However, you must avoid a few common mistakes which new users do.

❌ Paying a low gas fee

By default when you initiate a transaction on Uniswap, the connected Metamask wallet estimates the gas fee in the network at the current timestamp.

But this gas fee may not always be sufficient especially in times of high network congestion. A good example of that is a token launch event when the network is very busy. Using a low gas fee will most likely result in a failed transaction.

Even if the transaction fails, the gas fee will not be reverted.

❌ Paying a very high gas fee

Some users try to get around the scenario described above by paying enormously high gas fee which is in most cases more than what is actually required.

While this will most likely get your transaction accepted, you will also end up paying more in gas fee than actually required.

So the question arises, how does one know the appropriate gas fee?

You could use a website such as ethgasstation.info to get details about the various types of gas fee based on the speed of the transaction.

The gas fee is categorized by this site into various categories depending on how fast you want your transaction to be confirmed by the Ethereum network as shown below.

Trader: For the fastest confirmation of a transaction

Fast: For a quick confirmation but not the fastest.

Standard: For a standard confirmation which ensures that it is done within 5 minutes.

In times of very high network activity such as a Token launch event, I would advise you to use a bit more than the Trader’s fee. Adding a 10% or 20% on top of the Trader’s fee should be more than enough to get your transaction through successfully.

So if the Trader’s fee is 100, then you can pay anywhere in the range 100 to 120. If a user pays a high gas fee such as 200 in this case, then they are unnecessarily spending an extra 80 to 100 gwei in the gas fee.

#3: Set appropriate slippage in Uniswap

Prices of cryptocurrencies change with time. The prices are very volatile at the time of important events such as a token launch. There is a small delay between when you initiate a transaction using Uniswap and when it gets broadcasted to the network. Even in this duration the price can change significantly, sometimes more than 2% or 3% also. In such a scenario, your transaction will fail because the target price set by you is no longer meeting the current price. This change in price at the time of transaction is called slippage.

Uniswap allows you to set the slippage in terms of percentage as shown below.

By setting a slippage of 2%, you are telling Uniswap to accept a change in price of 2% (increase or decrease) and still allow the transaction to go through. This feature can be very useful at times of token launch. It is often used by users who want to buy the tokens as soon as possible after the token listing on Uniswap.

However, there are common pitfalls to consider here.

❌ Setting a very low slippage

If you are trying to buy a token whose price is fluctuating very quickly, then chances of your transaction succeeding are very low because you either set a low slippage or no slippage.

❌ Setting a very high slippage

One might think that setting a high slippage is a great solution to the problem described above. That’s not the case always. The reason being, if you set a very high slippage then the chances of you taking a loss are also high due to something called as Front running bots.

Front running bots are bots which monitor the pending transactions in the TX pool and look for specific values of interest. Once they find such a pending transaction of interest, they initiate another transaction which matches the pending transaction but with a much higher gas fee. By doing so, their transaction gets priority over the pending transaction and gets included in the next block. This causes the price of the coin to go up and then they dump the tokens at a higher price. All this can be achieved within the same block by a front running bot.

When you set a slippage in Uniswap greater than or equal to 6%, you will be displayed a warning by Uniswap which says that your transaction might get frontrun as shown below.

This is why it is important to choose an appropriate value of the slippage to avoid such scenarios.

The good news is that, some of the newer decentralized finance token swap solutions such as Polkastarter and BondSwap have anti-slippage measures in place and even support fixed token swaps which resolve the issue of slippage in price.

#4: Token approval fee is paid only one time

One of the things which can catch a newbie by surprise on Uniswap is the new token approval mechanism. When you add a new token on Uniswap and try to swap it with another token for the first time, Uniswap will ask you to approve that coin first. As can be seen below, Uniswap is asking to “Approve BONDLY” before the swap with USDT can be initiated.

Approving a token will also result in a transaction on Ethereum blockchain using a gas fee. When you click on Approve, it will ask you to confirm the transaction manually using the UI wallet (such as Metamask).

This is a one time process. Once you have approved the token, you don’t have to repeat this process again.

#5: Wait for low gas fee if transaction is not urgent

At times of high network congestion, the gas fee in the Ethereum network is usually high. Due to this, it is advisable to wait for the network congestion to reduce before attempting a transaction so that you can get a better result with a lower gas fee while avoiding the probability of your transaction failing.

If you enjoyed this story, please click the 👏 button and share to help others find it! Please feel free to leave a comment below.

--

--

CryptoShine

A passionate cryptocurrency and blockchain technology enthusiast sharing knowledge with the world.