Have you ever suffered a sandwich attack while using a decentralized cryptocurrency exchange?
Do you want to know how to avoid such an attack besides multiple small purchases?
Maybe you don't even know what a sandwich attack is?
A sandwich attack is a type of front-running attack. How does it work?
1. Detect a buy trade before the trade is executed.
2. Purchase a certain amount of the same token before the user's transaction is executed.
3. Wait for the user's transaction to be executed.
4. Immediately followed by an immediate sale of all tokens.
5. Make a profit.
How to judge whether an LP has been attacked by a sandwich?
Dextools shows sandwich attack trades in its trade history section.
Example: We saw a bot buy $6333 worth of DXP and sell it minutes later for $6619, taking advantage of a legitimate buyer in the middle.
For a robot, this is easy money. But you can use a custom RPC endpoint, making your transaction private so it cannot be seen and exploited by sandwich bots.
There are two options: