0 minsPublished on 1/12/2024

What are token swaps? A beginner's guide to swapping tokens

Learn all about token swaps, how you can execute them with your crypto assets, and the benefits they bring to the larger DeFi ecosystem.

By Mrig P

what are token swaps

Since the launch of Ethereum in 2015, decentralized finance (DeFi) has come a long way. And out of all the services that have played a crucial role in building the DeFi ecosystem, token swaps are critically important.

Without the ability to swap tokens within a blockchain network or between two different blockchains, DeFi as we know it would come to a grinding halt.

This beginner's guide on token swaps explains what they are, how they work, and how you can start swapping tokens.

What is a token swap?

A token swap refers to the exchange of one crypto token for another without the need to first convert it to fiat currency. For example, when you deposit Ethereum's native token (ETH) on a decentralized exchange (DEX) and get USDT in return, you are conducting a token swap. 

But there's more. 

Token swapping has three distinct meanings in the crypto space. Let's explore each one of them separately.

Regular token swaps

Regular token swaps simply refer to the exchange of tokens through a centralized or decentralized crypto exchange.

The concept of token swapping through both exchanges is the same — you sell a token you already own and buy an equivalent value of the other token. However, the amount of control you have over your digital assets differs in both exchanges. 

Centralized exchanges are custodial, meaning they have ultimate control over your assets. Decentralized exchanges, on the other hand, offer users complete control over their assets, which they store using a non-custodial wallet.

Cross-chain token swaps

A cross-chain token swap is when you move your tokens from one blockchain network to another. This is usually done using bridges that lock tokens on one blockchain and mint a wrapped token on the other. 

For example, you can use the Binance bridge to lock your ETH on the Ethereum network and receive wrapped Ethereum (wETH) on the Binance chain. And you can follow a similar process to unwrap your wETH and receive ETH in your Ethereum wallet.

Token migration

A token migration occurs when a project migrates from one blockchain network to another to raise funds or improve its functionality. Here's how this works:

  1. The developers raise funds by distributing “placeholder” tokens on a blockchain like Ethereum. 
  2. Once the project is complete, token holders are asked to exchange the placeholder tokens for the native tokens of the new blockchain. This is essentially a token swap since there is an exchange of tokens between blockchains.
Types of token swaps.

Only the first two examples (regular token swaps and cross-chain token swaps) are a “token swap” in the sense that one token is swapped for another. Token migration isn't technically a swap but rather the migration of the entire supply of a project's token from one chain to the other. 

For the purpose of this article, we'll only focus on the first two types of token swaps.

How do token swaps work? 

By now, it's pretty clear that token swapping means one of two things: exchanging a crypto asset to get another desired token on the same chain or passing your token through a crypto bridge to use it on a different blockchain.

Depending on which type of token swap you're conducting and on which platform, the process may differ. 

Decentralized exchange swaps

Decentralized exchanges are crypto swapping exchanges that do not need you to deposit your assets into the exchange, meaning you have complete control over your assets.

On DEXs, a token swap relies on user-supplied funds locked in a smart contract to create enough liquidity for users to swap tokens. 

To contribute to liquidity pools, users (also called liquidity providers) must deposit their digital tokens in an equivalent ratio to keep the pool balanced. For example, if someone is depositing liquidity in an ETH/USDT pool, they must deposit an equal worth of both assets, say $500 worth of ETH paired with $500 worth of USDT. 

Each set of paired tokens has a separate liquidity pool on the DEX, and to complete token swaps you need to add a token to a respective liquidity pool and withdraw an equal worth of the other token from the pool (after paying a small transaction fee to the blockchain). 

If you're swapping tokens that don't exist as an exact swap pair, you'll have to convert your digital assets into a stablecoin (such as USDT or USDC) or some other popular digital assets before swapping to your final token. 

For example, if you want to trade COMP (the native token for Compound) for BAT, you'll have to convert your COMP into a popular token like ETH first because COMP/BAT pair liquidity pools are fairly difficult to find.

Once you've converted your COMP to ETH, you can easily find an ETH/BAT pair and buy BAT tokens. This intermediate step means more gas fees and higher transaction costs.

Did you know? MoonPay makes it easy to trade COMP for BAT directly, without the need for multiple crypto swaps.

Still confused? Don't worry, we'll cover the exact steps needed to swap tokens below.

A screenshot of the autorouter feature in Uniswap.
Autorouter feature in Uniswap (Image source)

DEXs like Uniswap offer an auto-router feature that directs your trade COMP for ETH or USDT to BAT in a single transaction, significantly lowering the total cost of trading fees you pay for the transaction. MoonPay allows you to make these types of direct swaps as well.

Centralized exchange swaps

Centralized exchanges work similarly to traditional stock exchanges, employing the order-book model to make swaps.

An image showing an order book.
An order book (Image source)

Order books are electronic ledgers that contain a list of all the buy and sell orders, which includes order volume and the price at which users are willing to buy or sell their assets. 

When you place a buy order, it's sent to the order book where the matching engine tries to find a corresponding sell order. Once the two orders are matched, the token swap is done.

While centralized exchanges use order books, decentralized exchanges use automated market makers (AMMs) like Uniswap, Bancor, and Curve to facilitate trades.

Cross-chain (atomic) swaps 

Cross-chain swaps, also known as atomic swaps, enable two users to exchange one digital token directly without needing an exchange or other intermediaries like a token swapping service. 

These swaps are carried out using a Hashed Time Lock Contract that ensures the token swap won't occur if either party doesn't deposit their assets and submit cryptographic proof of their transaction within a specific time frame.

Benefits of token swaps

Here are some of the most notable benefits of token swaps:

Purchase crypto tokens

Token swaps help you widen your exposure to crypto assets, even if you own just one crypto token. For example, ETH holders can go to a CEX or DEX to exchange their tokens for wBTC, BNB, ENS, MATIC, USDT, and a long list of other tokens. This is especially useful if you're investing in the crypto market as it helps reduce risk and volatility.

Access dApps across blockchains

Cross-chain bridges allow you to access decentralized applications (dApps) on different blockchains by moving assets across multiple chains. For example, if you're a Bitcoin user, you can explore dApps on the Ethereum blockchain with wrapped Bitcoin (wBTC).

Further, developers get the added flexibility to build multi-chain protocols and tap into the audience on multiple chains. Devs can also leverage the large audience base on a popular blockchain like Ethereum to gain traction for their project and initiate a token migration after launching their blockchain.

Disadvantages of token swaps 

Token swaps are not foolproof and bring some risks to the table. 

High slippage

If you're trading fairly new tokens on a DEX, you're bound to experience “slippage” due to low liquidity. Slippage is when there's a price difference between the expected price and the price at which an order executes. 

This tends to happen for large orders because the withdrawal changes the liquidity in the pools, which subsequently alters the asset’s price when your trade gets executed. 

Bridge hacks

Cross-chain bridges allow you to take your tokens from one blockchain chain to another. Since cross-chain bridges are a concentrated source of liquidity, however, hackers sometimes target them to steal users' funds. In 2022, bridge hacks accounted for $2 billion in funds stolen

How can I swap tokens?

There are three different ways to conduct a token swap. Let's look at each of them in detail.

A graphic showing how to conduct a token swap.

1. Token swap on a decentralized exchange

Here's a step-by-step guide for token swapping ETH to USDT on Uniswap. The actual steps may vary depending on changes to the user interface or product offering. You can follow similar steps to conduct a token swap on other exchanges as well. 

Step 1. Open Uniswap.

Screenshot of the Uniswap interface.
Uniswap interface (Image source)

Step 2. Click “Connect Wallet” and choose a wallet of your choice. For the purpose of this demonstration, we're using the Metamask wallet

A screenshot showing how you should connect your wallet to Uniswap.
Choosing your wallet on Uniswap (Image source)

Step 3. Select the tokens you want to swap and receive. 

A screenshot showing how to select the tokens you want to swap and receive on Uniswap.
Selecting the tokens you want to swap and receive (Image source)

Step 4. Enter the number of tokens you want to swap and Uniswap will automatically calculate the approximate number of the other token you'll receive. 

A screenshot showing the amount of ETH you want to swap.
Entering the token amount you want to swap (Image source)

Step 5. Confirm the transaction details.

Step 6. Approve Uniswap's request to use your token by signing wallet transactions. 

Step 7. Click the swap button and confirm the transaction from your wallet pop-up to complete the swap.

2. Token swap on a centralized exchange

For the purpose of this example, we'll use the Binance exchange to conduct a token swap. The actual steps may vary depending on changes to the user interface or product offering. You can follow a similar process to swap tokens on other exchanges. 

Step 1. Go to Binance and create an account.

A screenshot of the Binance interface.
Binance interface (Image source)

Step 2. Click “Verify Now” and enter your personal details to complete the verification process.

A screenshot of the verification screen on Binance.
Identity verification (Image source)

Step 3. Go to the exchange section.

A screenshot showing the Binance exchange section.
Binance exchange section (Image source)

Step 4. Select the token pair you want to trade.

A screenshot showing the selection of token pairs to trade.
Select the token pair to trade (Image source)

Step 5. Enter the trade details. 

Step 6. Confirm and execute trade.

3. Cross-chain token swap 

There are a wide range of blockchain bridges that help you transfer your crypto assets from one chain to the other. To give you an overview of how the process works, let's use the Polygon bridge to bridge assets from Ethereum to Polygon. The actual steps may vary depending on changes to the user interface or product offering.

Step 1. Go to the Polygon wallet suite and click “Polygon Bridge” to log into the Polygon wallet.

A screenshot of the Polygon wallet suite.
Choose "Polygon Bridge" (Image source)

Step 2. Next, choose your Ethereum wallet and connect it to Polygon. We're using the Metamask wallet again for this example.

Step 3. Sign your transaction by clicking “Sign” to connect your wallet. 

Step 4. Next, go to the deposit tab and add the amount of tokens you want to bridge.

A screenshot of the Polygon Bridge.
Deposit tokens in the Polygon Bridge (Image source)

Step 5. Check the estimated gas fees. 

Step 6. Confirm your transaction through your wallet and complete the bridge.

Once the transaction is confirmed on the blockchain, you will receive the tokens in your Polygon wallet.

Note: You might have to add the token manually to your Polygon wallet.

Token swaps have become a central feature of the DeFi ecosystem, powering both centralized and decentralized exchange platforms. They not only enable interoperability and allow DeFi users and developers to get more exposure to different blockchains, they also provide investment opportunities to crypto traders.

Depending on whether you prefer non-custodial or custodial wallets, you can either swap tokens on a decentralized or centralized exchange. However, you must educate yourself on the benefits and risks of using either of these approaches.

How to swap tokens via MoonPay

MoonPay allows users to swap tokens on its platform.. To exchange cryptocurrency, just download the MoonPay App (on either the Apple App Store or Google Play Store) and follow these steps:

Step 1: Select your cryptocurrency trading pair

MoonPay offers a diverse range of cryptocurrencies available for swaps, with many trading pairs supported. To get started, simply choose the crypto assets you'd like to exchange, such as ETH to BTC.

A screenshot of a MoonPay Swap transaction from Polygon (MATIC) to Ethereum (ETH).

Step 2: Enter the amount of crypto to swap

After choosing the swapping pair, next you'll need to decide how much crypto you'd like to swap. There is a minimum amount of $15 for all crypto exchange transactions.

A screenshot of a MoonPay Swap exchange between MATIC (Polygon) and ETH (Ethereum).

Step 3: Connect your wallet

Using WalletConnect, MoonPay allows you to connect your preferred non-custodial crypto wallet to receive your new tokens.

Choose the wallet that best suits your crypto needs, from options like MetaMask, Trust Wallet, Rainbow, Uniswap, Ledger, and Exodus.

A screenshot of a MoonPay Swap WalletConnect screen.

Step 4: Review details and confirm the swap

Before completing the swap exchange, you'll be asked to review transaction details, including crypto swap amount, cryptocurrency wallet address, exchange rate, as well as transaction fees incurred.

Click "Confirm swap" to initiate the cryptocurrency exchange.

A screenshot of a MoonPay Swap transaction confirmation screen.

To cover any network fees, make sure that you have enough crypto in your wallet.

Step 5: Receive your crypto

After the transaction is confirmed on the blockchain, you'll receive your new cryptocurrency tokens in your selected wallet.

A screenshot of a MoonPay Swap in progress.

Note: if this is your first time completing a crypto swap transaction with MoonPay, you’ll need to pass identity verification and KYC before continuing with the exchange.

Start token swapping today

MoonPay is changing the token swap game with our new Swaps feature.

To get started with your first token swap, first simply buy crypto via MoonPay using your credit card or any other preferred payment method. MoonPay's widget offers a convenient way to buy Bitcoin, Ethereum, and more than 50 other cryptocurrencies.

You can also kick off your crypto journey by topping up your wallet in euros, pounds, or dollars and use your MoonPay Balance for buying crypto tokens to swap. Use your balance to enjoy lower transaction fees, quicker processing times, and better approval rates. Plus, withdraw to your bank account with zero fees when you're ready to cash out.

MoonPay also makes it easy to sell crypto when you decide it's time to cash out. Simply enter the amount of the token you'd like to sell and enter the details where you want to receive your funds.

Swap crypto for more tokens

Want to swap your crypto for other cryptocurrencies like Ethereum and Bitcoin? MoonPay allows you to swap tokens cross-chain with competitive rates, directly from your non-custodial wallet.

Mrig P
Written byMrig P

You might also like