At the heart of decentralized finance is Uniswap, a decentralized platform allowing you to acquire ERC-20 tokens long before they arrive on centralized exchanges like Binance. Let’s discover this relatively intuitive platform and MetaMask, the famous Ethereum portfolio often associated with it.
Uniswap is a protocol as well as a decentralized platform for the exchange of cryptocurrencies. The latter has seen a 6000% increase in volume in 2019.
What is Uniswap?
You may have heard of a decentralized exchange (DEX) based on Ethereum, called Uniswap 🦄. It allows token exchanges without trust, meaning that all transactions are executed from smart contracts without an intermediary.
The Uniswap protocol was introduced in November 2018, when deployed on the Ethereum blockchain’s mainnet. It is developed by a small team based in New York, USA. In launching Uniswap, the team is committed to using only open source technologies and developing the decentralized web, a principle it still respects today.
Totally open source and censorship-resistant, Uniswap allows the exchange of ERC-20 tokens, as well as ETH to an ERC-20, and vice versa. It also allows you to contribute to liquidity pools for any ERC-20 token and thus earn commissions in the form of exchange fees.
Uniswap is a true benchmark for decentralized finance (DeFi) aficionados and is the preferred platform for buying and selling tokens from this ecosystem.
Indeed, the Uniswap protocol allows anyone to create new markets, provide liquidity, and build financial applications that could not have existed before.
💡 Before going further on the use of Uniswap, it should be noted that anyone can create an ERC-20 token on Ethereum, including true copies or fake versions of existing tokens. Before acquiring a token on Uniswap, it is strongly advised to do your own research on the seriousness of the underlying project.
Relatively easy to use, Uniswap requires a connection to an external portfolio supporting Ethereum. For optimal comfort, this Uniswap tutorial will be done with the famous MetaMask web wallet.
Discover the 3 preliminary steps before being able to use Uniswap. If you already have a MetaMask portfolio and/or you already hold funds in it, select below the chapter that concerns your situation.
To begin, you need to download MetaMask, which takes the form of a browser extension. It is available on Chrome, Firefox, Opera and Brave, among others. Click on the link below and add the MetaMask extension to your browser :
Once MetaMask is installed, the process of creating your portfolio begins. You must now choose between linking a portfolio you already have or creating a new one. For a more simplified use, choose to create a new wallet.
MetaMask now asks you to create a password to secure your portfolio. For security reasons, I strongly advise you to create a unique and complex password, which you reserve for MetaMask.
MetaMask keeps your private keys locally in your browser, and your password allows you to encrypt them so that no one but you can use your funds from that browser.
Finally, MetaMask will ask you to save a secret 12-word backup phrase. This phrase is extremely important and will allow you to retrieve your funds if you lose access to your device.
Write this phrase on a piece of paper and store it in a safe place. If you want even more security, write it down on several pieces of paper and store them in two or three different places.
💡 Beware of phishing by mail! MetaMask will never ask you for your recovery phrase. Never share this phrase with anyone.
Once you have made your arrangements, click on the Next button:
Finally, MetaMask asks you to fill in the recovery phrase to make sure that you have saved it correctly. The process is now complete, you can now use MetaMask!
Before using your MetaMask wallet, you must supply it with ETH or ERC-20 tokens. To do so, you can either deposit funds from another platform or buy Ether directly from the extension.
Due to the high cost of the latter method, I strongly recommend that you purchase Ether outside the options offered by MetaMask. If you do not have ETH yet, you can consult our guide to purchasing this cryptocurrency.
Once you have your ETHs in your pocket, you need to send them to MetaMask. To do this, click on the Buy button and then on View Account:
Then MetaMask displays your deposit address and its associated QR code. Now send your ETHs from the withdrawal function of the platform where they are currently stored.
Depending on the congestion of the Ethereum blockchain during the execution of your transaction, it may take from a few minutes to several hours before it reaches your MetaMask portfolio. So don’t be worried if you don’t receive your ETH at the moment.
Your ETH have arrived on MetaMask? Now let’s make the connection between your wallet and Aave!
Before using your funds on MetaMask, you must link your portfolio to Uniswap. To do so, go to Uniswap and click on the Browser Wallet button:
Then choose the portfolio to be linked, in this case, MetaMask. A MetaMask window will then open and ask you to confirm the connection to the Uniswap exchange. Click on the Next button then Connect to establish the connection.
That’s it, your funds held on MetaMask are now directly usable on Uniswap! Now that this step is over let’s discover how to make our first token swap on Uniswap.
Swap tokens on Uniswap
Now that your ETH can be used on Uniswap let’s get to the heart of the matter, the token swap. The interface is relatively simple to use.
To swap two ERC-20 tokens, select in From the one you currently own and the quantity you wish to swap. Then, select the token you wish to acquire in To:
By clicking Select a token, Uniswap suggests you add a list of tokens to your interface. You can then select lists from other platforms or protocols, such as 1inch, Aave, CoinMarketCap, Coingecko, or Compound.
To illustrate an exchange, I would use the Coingecko list, which is the most complete. Once the list is selected, you can directly search for the desired token. Suppose I want to buy YFI tokens from the Yearn.finance project:
By clicking on the Swap button, Uniswap presents you with a summary of your transaction. Before validating your swap, don’t neglect the Ethereum network fees, which can tend to reach peaks in case of congestion of the blockchain.
In addition to the Ethereum network fees, note that Uniswap takes a fixed commission of 0.30% on each of your transactions. So check that everything is correct before validating your swap.
Congratulations, you now own YFI and know how to get cryptocurrencies on Uniswap 😉
If you can’t find the token you want to purchase from one of the lists, I explain how to do it in the next part.
Find a token on Uniswap
Very often, when a new token arrives on Uniswap, it will not be included in any list. So you have to search for it yourself on the platform.
To do so, simply go to the Etherscan.io site and search for the token you are interested in. I would take the KIMCHI token example, which is not included in any list (I do not recommend its purchase. It is just an example).
Once on Etherscan, search for the desired token from the search bar:
The following page contains the address of the contract related to the token you are looking for. Check that it is indeed the desired token with all the information, then copy the address on the right of the page:
Once the address is copied, return to Uniswap and paste it into the search bar. If the address is correct, you will find your token. To add the token to your list and avoid repeating the Etherscan manipulation, click on Add:
Now you know how to take full advantage of what Uniswap has to offer. Especially useful for finding new nuggets, but be careful when using this decentralized exchange.
Indeed, any token based on Ethereum can be added if it meets the liquidity criteria. Before purchasing a Uniswap token, please inquire beforehand about the seriousness of the underlying project.
With the craze for decentralized finance, many tokens are created for speculative purposes only. For example, YAM, HOTDOG and PIZZA all made their first appearance on Uniswap and their prices collapsed by more than 99% in a few hours.
Uniswap Advanced Tips
Identify fake coins on Uniswap
As I told you earlier, everyone can create an ERC-20 token and even make a similar copy of a pre-existing one. Thus, there is a lot of scam & fake coins on Uniswap. Buying any of those tokens is irreversible and you will not be refunded.
To avoid being scammed, you will have to find data on a trusted website.
The one I recommend is Coingecko. Search the token you want to exchange on Coingecko. You will notice the trading pair for Uniswap at the bottom of the page. When clicking on it, you will be redirected to Uniswap and the token will be imported.
Get faster transactions on Uniswap
Depending on the ETH congestion, transactions can take more time than anticipated. Moreover, when you are buying a hyped coin going up, you want to get your transaction confirmed faster than the other traders. You can only achieve this by paying more gas fees.
On ETH Gas Station, you can monitor the recommended Gas Price to have a faster transaction. I recommend you to pay a bit more than the recommended price for fast transactions.
How to avoid failed transactions on Uniswap?
Transactions on Uniswap can fail when the price is moving up or down quicker than the confirmation of your transaction and doesn’t meet your slippage criteria anymore.
If a transaction fails, you will be credited back with the funds you originally sent, but your fees won’t be refunded.
A simple process to avoid failed transactions is to increase your gas fees. This will speed up your transaction.
Uniswap Liquidity Pools
Liquidity Pools are a reserve of tokens locked in a smart contract.
Thus, these reserves are used by two types of actors:
- Liquidity providers.
- The users of this liquidity.
Liquidity providers deposit tokens in the exchange pools for rewards (fees, interest, etc.). Users can use those liquidities to swap their tokens.
On Uniswap, liquidity providers deposit a pair of assets, for example, the DAI/ETH pair. A 50/50 ratio is set by the protocol, so when a user adds 1 ETH to this pair, he must necessarily bring the same value in DAI.
Therefore, anyone wishing to make an exchange between either of the assets will tap one side of the pool by depositing on the other. For example, if we want to exchange ETH into DAI, the protocol takes our ETH and sends us the corresponding DAI value in exchange.
In order to ensure that the protocol has permanent liquidity, it uses an automatic market maker formula. Thus, during a swap, the amount returned is based on the ratio between the two assets in the pool (in our case ETH/DAI). However, the larger the order you place in relation to the size of the pool, the worse the rate you will get as the ratio moves along the curve. This phenomenon is called slippage.
Liquidity Providers will receive fees for conducting swaps in the pool. As told earlier, Uniswap charges a 0.3% fee for each transaction. This fee is actually split amongst all the liquidity providers of that pool.
Advantages & Disadvantages of Uniswap
Advantages of Uniswap
- Anonymous – No need to perform a KYC to use Uniswap
- Security – Uniswap does not hold any of your funds and is as secure as the Ethereum blockchain itself.
- Quick Access – Uniswap gives you instant trading access to ERC20 tokens
Disdvantages of Uniswap
- Gas Fees – When the Ethereum blockchain is experiencing high congestion, fees can be extremely expensive.
- Failed transactions – When gas fees are set incorrectly, a transaction can easily fail, thus you may lose a significant value of money due to repeated fees.
- Scam tokens – The decentralization comes with many problems, and scams are one of them. If you do not pay attention, you can fall into a scam in a matter of seconds.