Swapping Tokens on MetaMask
Tags: blockchain, consensys, fintech
Published: 2021-07-27 14:44:29

MetaMask, one of the most popular Ethereum based crypto wallets, offers the ability to swap one crypto token with another—seamlessly. We can do that either by using the built-in Swaps feature within the wallet app/extension, or manually by using any Decentralized Exchange (DEX), such as Uniswap.

If you don't have MetaMask installed on your device, you can do so by following [this](https://dev.to/manbir/a-guide-to-metamask-ecosystem-leading-ethereum-blockchain-wallet-59k7) guide.

## •  Using the built-in Swaps feature

![1_uy-1VbHPw8vJd62lIqgGvA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bo392dxlybibghvp3io3.jpeg)
 
To swap a token using the Swaps feature on MetaMask, we'll need to follow these simple steps:
1. Open the MetaMask extension or Mobile app
2. Click or tap the ‘Swap’ button
3. Select the tokens you want to swap and click ‘Get quotes’
4. Let MetaMask do its magic ;)
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hmaex5d708k6d8c3q8br.gif"/>
5. Compare all available quotes and select the best one
6. Click on ‘Swap’ and wait until the transaction completes

With an availability of tons of DEX platforms in the market, this is the easiest and fastest way to swap tokens on MetaMask, as it
✅ Finds the best prices everytime
✅ Reduces number of token approvals
✅ Protects slippage
✅ Reduces gas costs and shortens the path to executing each swap

---

## •  Manually using a DEX

To manually swap tokens using MetaMask, we can use a DEX such as Uniswap,  SushiSwap, 1inch, ParaSwap or any other leading platform. Let's walk down the steps on how to do it with Uniswap. These steps would be pretty much the same on other DEX platforms as well. 

### 1. Fire up your browser and visit [uniswap.org](uniswap.org) 

![Screenshot from 2021-08-13 13-08-21](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdobqwnxiw0tdzy86qo8.png) 

Then click on the ‘Launch App’ button in the top left corner. The swapping interface will be launched and you’ll see an option to select the tokens you want to swap. 

![Screenshot from 2021-08-13 13-08-38](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7nq4z3krujqnqgv5p0x1.png) 
 
### 2. Click on 'Connect to a wallet' at the top right corner
Ensure that you're signed into your MetaMask wallet. Then select MetaMask from the list of supported wallets. 

![Screenshot from 2021-08-13 13-08-49](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afhyy7q4mp0oizg86htj.png) 

### 3. Select the account you want to connect and click 'Connect'

![Screenshot from 2021-08-13 13-10-41](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eri146m60d44ohwp279u.png)
  
### 4. Select the tokens you want to swap in the 'From' and 'To' section, and click 'Swap'.

You might need to approve the selected token first to let Uniswap access your existing tokens. 

![uniswap-swapping-tokens](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g48coyvv9my0nsfnit28.jpg)
  
### 5. Sign the transaction from your wallet

Your MetaMask wallet will show the estimated gas fees to be paid. To proceed, simply sign the transaction by clicking 'Confirm'. And voila! 🎉 Your transaction is submitted. You can view the status of your transaction on EtherScan. 

![submit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pux3blqevkjjg9qgs3e7.png)
 
Make sure that you've added the token's contract in your MetaMask wallet so that it shows up after the swap. Cheers! 🥂

---

You can learn more and join the MetaMask Community [here](https://community.metamask.io/). If you liked the blog and would like to connect, here's my [Twitter](https://twitter.com/manbirmarwah).

> *Disclaimer: This blog is meant for educational purposes only and nothing from this blog should be taken as financial advice. Please DYOR before investing.*