Token Swap
A token swap is the exchange of one crypto asset for another. It can take place on a centralised exchange, decentralised exchange, wallet, automated market maker, or DEX aggregator.
✦ Key Insight
Token swaps are a basic part of crypto trading and decentralised finance. They allow users to move between stablecoins, native coins, governance tokens, wrapped assets, and other digital assets. The final result of a swap can be affected by liquidity, slippage, price impact, network fees, priority fees, routing, and token taxes or restrictions.
✕ Common Misconceptions
Swapping the wrong token with a copied symbol
Ignoring the token contract or mint address
Setting excessive slippage
Approving malicious contracts
Forgetting network fees
Assuming a quote guarantees the final amount
Detailed Explanation
How It Works
On a decentralised exchange, the user selects an input and output token. The trading application searches for an available route and provides a quote.
The user may first need to approve the smart contract to use the input token. After the transaction is signed, the smart contract takes the input asset and transfers the output asset to the wallet.
A DEX aggregator may split the order across several liquidity pools to improve execution.
FAQs
Is a token swap a taxable event?
It may be in some jurisdictions. Tax treatment depends on local rules.
Why did I receive less than the quote?
The price, route, liquidity, or slippage may have changed before execution.
Can a swap be reversed?
Confirmed blockchain swaps are generally irreversible.
In Practice
Dig Deeper
Slippage
Slippage is the difference between the price a trader expects when submitting an order and the actual price at which the trade executes. Slippage is common in crypto markets and is usually more noticeable during high volatility or when trading low-liquidity tokens.
Liquidity Pool
A liquidity pool is a collection of crypto assets locked in a smart contract that allows users to trade tokens on decentralized exchanges without relying on a traditional order book.
DEX Aggregator
A DEX aggregator is a protocol or service that sources liquidity from multiple decentralized exchanges and routes a user’s trade across the best available pools or paths to achieve optimal price and minimal slippage.
