That’s right yesterday Someone swap token 220k USDC and received 5k USDT on Uniwap What the problem?
To day we will explain about this everything for newbie.
What is Swap on DeFi?
Swap is the exchange of cryptocurrencies, for example:
🔹 You have 220,000 USDC (a stablecoin)
🔹 You want to exchange it for USDT (another stablecoin)
🔹 You do the exchange via a DEX (Decentralized Exchange) such as Uniswap or PancakeSwap
Normally, if both coins are the same stablecoin, the exchange should be 1:1
👉 But you only got 5,000 USDT, which means you lost a lot of money

Picture by 0xa88d106c8ee5d02937fbb2e418722a93994cac8f
What happened about swap token?
There are 2 main reasons why you might get this:
🔹 (1) Slippage not set → Very bad rates
Slippage refers to the price discrepancy between when you make a transaction and when the transaction is actually executed.
💡 If you don’t set a Slippage Tolerance, the system will use whatever rates the market provides, which could result in very bad rates.
Example:
You press Swap thinking the exchange rate is 1 USDC = 1 USDT
But when the transaction is processed, it turns out that the exchange rate is 1 USDC = 0.02 USDT
You only get 5,000 USDT from 220,000 USDC
💡 How to protect:
✅ Set a suitable Slippage Tolerance, such as 0.1% – 0.5%
✅ If the slippage value is too high, the system will not execute the transaction, so you will not get a bad price
🔹 (2) Get hit by Frontrun or Sandwich Attack
Frontrun is when a bot on the Blockchain secretly sees your trading order and intervenes to make a profit from you
🕵️♂️ How does it work?
When you press Swap, the bot sees that you are going to buy a lot of coins.
It will make a transaction before you by buying the coin you want to buy first.
The price of the coin goes up (because the bot bought it first)
And then it sells it to you at a higher price.
You end up getting much less coins.
💡 How to prevent:
✅ Use a DEX Aggregator like 1inch, Matcha (helps find the best liquidity)
✅ Set low Slippage to reduce the chance of bot intervention
✅ Use Limit Order instead of Market Order (if supported by the platform)
- Why do you get so much less coins?
This is about Price Impact or the impact on the price.
💡 The more you swap, the less liquidity in the market, the more the price will rise or fall.
A simple example:
Let’s say the pool has only 50,000 USDT.
But you swap 220,000 USDC in the same pool.
The system will try to find a rate for you. But since there is not enough USDT, the system will gradually pull the worse rate.
Eventually, you may get a very bad exchange rate, such as 1 USDC = 0.02 USDT
💡 How to prevent:
✅ Check the Price Impact before Swap (if it is more than 1-2%, be careful)
✅ Try splitting the transaction into multiple times instead - How to check before Swap
🔍 Before pressing Swap, you should do these things:
✅ Check the Slippage (recommended 0.1% – 0.5%)
✅ Check the Price Impact (if it is higher than 2%, be careful)
✅ Try using a DEX Aggregator such as 1inch, Matcha to find the best price
✅ If you want to swap a lot, use a Limit Order - Short summary
❌ Don’t set the Slippage → Get a very bad price
❌ Frontrun → Bot intervention, causing you to lose more money
❌ Swap too much in a small pool → Very high Price Impact
✅ How to prevent
🔹 Set the Slippage Tolerance (0.1% – 0.5%)
🔹 Check the Price Impact before Swap
🔹 Use a DEX Aggregator such as 1inch, Matcha
🔹 If it’s a large amount, try splitting it into multiple transactions.
We hope this doesn’t happen to anyone else. Share this with your Defi friends.
Reference : 0xa88d106c8ee5d02937fbb2e418722a93994cac8f
Credit : Natthapong Suwanjit
Join our gang by purchasing the Animalverse Club NFT, which is the key to accessing a ton of benefits.
Animalverse SoicialFi is a web3 social media platform designed to connect users around the world without the influence of algorithms, promoting equal access to information. The platform aims to create a decentralized environment where users can freely share and consume content and send crypto, which is fully consistent with the principles of blockchain technology. Let’s be a part of AVC ecosystem Home BlackMarketplace Groups Games Jobs Blog
Sanwich attack