Sitemap
Ashutosh Tiwari

Ashutosh Tiwari

Technical Writer & Researcher | Blockchain / AI

How to avoid losing money to MEV bots -

3 min readSep 27, 2026
Press enter or click to view image in full size

Before diving straight into the problem I am assuming that you are well
aware of slippage and MEV attacks and traded in crypto before.

Why this happens is a good thing to first understand, without going into
any definitions and explainer I would say it straight.

This happens generally in low liquidity pools where, shortage in supply results in increase in the assets price.

The main cause of slippage and sandwich attacks is, someone else(generally bots) putting their trade before yours when your trade is waiting on the mempool before getting executed.

The trick is, if someone is buying ahead of you this increases the token prices which results in a receiving little lesser tokens and then immediately sending them to pocket the difference in the increased price. These are called sandwich attacks.

Press enter or click to view image in full size

I’ve seen the usual advice that is to increase slippage when a transaction keeps reverting. That’s useful for getting a transaction through. But you’re also increasing the range in which your trade can execute.

For e.g. If your swap is expected to return $10,000:

0.5% slippage → minimum → $9,950
2% slippage → minimum → $9,800

That doesn’t mean a bot will automatically sandwich you at 2%. It means you’ve given the transaction more room to execute at a worse price. I see slippage as an execution setting, not MEV protection.

A $10,000 swap isn’t equally risky across every pool. If the pool has deep liquidity, my trade might barely move the price.

Press enter or click to view image in full size

If the pool is shallow, the same $10,000 can move the pool significantly. And the larger the price movement created by my own trade, the more interesting that trade can become to an MEV searcher.

Get Ashutosh Tiwari’s stories in your inbox

Join Medium for free to get updates from this writer.

Suppose, we take two routes which are -

Route A
ETH → USDC
Expected: $9, 950
Price impact: 0.2%

Route B
ETH → TOKEN → USDC
Expected: $10, 020
Price impact: 1.8%

Route B here is giving a better quote, but you are taking a much larger price impact here. This shows that the highest quoted output isn’t always the safest execution.

I would also not suggest to use the same slippage tolerance for a liquid ETH/USDC pool and a thin altcoin pool. The first can absorb my trade without moving much. The second can’t.

better thing to do is to use -
liquidity + trade size + volatility + slippage together instead of treating slippage as a standalone number.

Press enter or click to view image in full size
this is a sample image just for clarification

How to avoid losing money to MEV bots -

1. Not to allow pending transaction with visibility -
have a private/protected execution

2. Don’t give the trade unnecessary execution range.
More Slippage

3. Don’t trade large amount into thin liquidity.

Things to check before clicking swap -

Slippage
Price impact
Pool liquidity
Route
Transaction protection
Trade size relative to liquidity

Understanding these six things properly would help you avoid many of the unecessary losses that happen during execution.

--

--

Technical writer & Researcher | Blockchain, AI

See more from me