In DeFi, you’re not always eating the sandwich, sometimes you are the sandwich.

Crypto trade front running is hardly news. So why bring it up again? There have been rises in this practice in 2025 so it’s worth taking another look. More importantly, there’s somewhat recent changes giving us options to cut down the risk. Part of the latest rise might be due to the latest crypto bull cycle, or new blockchain ecosystems. It’s also plausible that some are using newer AI tools to level up their bot game. In any case, I’ll cover the core issue for those not already familiar, then lay out some of the relatively new tools we can use. Some have been around awhile, but only recently started showing up in user-friendly wallets and services.
This problem of front running trades shouldn’t exist at all in a supposedly permissionless and trustless environment. Let’s remember part of why crypto was invented. There’s a lot about traditional finance (TradFi) that’s opaque to retail traders. No one seems to pay much attention until something breaks. We can infer the regulators don’t, can’t, or won’t do much to stop this. At least they haven’t so far, beyond a handful of show trials and fines that are small enough compared to gains that they’re just a cost of doing business. Some might argue front running in crypto is not even a flaw in the “trustless” design (which relies on code and consensus) but is just a tradeoff of openness, which happens to enable attacks without breaking rules. That may be true from a purist standpoint. But I’d argue it’s not a viable position for the long-term health of the ecosystem.
Wait, I’ll Save You!
Crypto was supposed to help fix financial exploitation in general. The Great Fever Dream of crypto, self-sovereign finance and so on was and remains a more transparent and self-governing system. This is still true. Though not so much just as counter culture. The die-hard philosophy seems to have faded in the same way 1960s hippies grew up and became Establishment Adults. Some lament this, but Decentralized Finance (DeFi) is finally going more mainstream. As it does, some is less decentralized. Look at institutionals piling into Bitcoin. It even turns out both crypto and Stablecoins ring some alarm bells about U.S. Cryptomercantilism vs. Monetary Sovereignty. Still, with Crypto, transactions and trade mechanisms are more open and visible to all than TradFi.
There’s still some sketchy issues with the crypto world though, and you should know about them. Because how you behave can help avoid them. For all its promise since the 2009 launch of Bitcoin, the crypto ecosystem can still be complex to navigate. User tools are getting better, but as of mid-2025, there’s still a lot of tech involved. Maybe not so much when using major crypto exchanges, but the moment you start getting more hands-on with your own wallets and using various decentralized exchanges.
Enough Background: Onto Sandwich Attacks Revisited
MEV / Maximal Extractable Value refers to profiting by manipulating ordering, inclusion, or exclusion of transactions during block creation. Transactions typically sit in a temporary holding area called the mempool before being executed. If someone can control how trades appear in a block, they can extract value from others, often without those others knowing. For those thinking, “Hey, isn’t MEV “Miner Extractable Value,” the answer is it used to be. (See history.) When Ethereum went to something called proof-of-stake, miners turned into Validators so the word had to change. Fortunately, there was another M word so we didn’t need yet another acronym.
One method of value extraction is known as a sandwich attack. Here’s how it works:
Step 1: A bot sees your large trade sitting in the mempool queue.
Step 2: It places a buy order just before you (front-run).
Step 3: Your trade pushes the price up.
Step 4: The bot immediately sells what it just bought into your price impact (back-run).
The result: You lose some value. The bot profits. You just got sandwiched.
If you’re wondering why the attacker doesn’t lose money if they push up the price, it’s because they’re waiting for large orders. Even using higher gas price to step ahead of your transaction, they’re transacting a lower amount on their buy and more on their sale. They calculate profit including fees. The attacker isn’t just “buying high and selling higher,” they’re buying low, forcing someone to buy high, and then selling to them or after them at that higher price.
This isn’t hypothetical or rare. It’s happening constantly to users who trade through decentralized exchanges (DEXs) without protection. And while amounts extracted per trade may seem small, they add up to millions, all going to highly optimized bots and their operators.
You may also be wondering, “Why doesn’t everybody do this? Can I do it?” Maybe. But it’s not always easy to be an unethical jerk. You’re maybe thinking, “Hey, it’s not even technically illegal yet. Don’t they say, “code is law” in blockchain world? I’m just taking advantage of a loophole.” Ideally it will be illegal one day and technical loopholes will close. In the meantime, let’s say you try this. You wouldn’t be the only one watching the mempool. There are many optimized bots competing for the same opportunities. They use custom software in low-latency data centers, simulating thousands of possible trades per second. They outbid each other on gas fees to get their transactions processed first. If you’re not top-tier, your bundle is ignored or outbid, and you lose money on gas. You’ve got to ask yourself, “Am I good enough or do I feel that lucky?”
Again, ironically, DeFi was supposed to fix this kind of behavior. Unlike TradFi, where front-running is illegal but often invisible and hard to prove, in crypto it’s auditable and without regulation. For now. The openness of blockchain infrastructure, with its transparent mempools and deterministic Automated Market Maker (AMM) logic, enables these attacks. Bots don’t break the rules. They use them. And unlike front-running on Wall Street, there’s no regulator. Yet. There is, however, an industry sense that fixing this is important. Because if trust in the supposedly permissionless / trustless system is at risk, people are likely to abandon it. People already have plenty of venues to place bets on known unfair games.
Let’s recall that “trustless” means you don’t need to trust intermediaries. The system is designed to run based on code, math, and consensus rules. Smart contracts and blockchains enforce rules automatically. Trust is placed in the protocol, not people. And there remains a fairness gap here. That is essentially the problem. No one likes to lose of course. But there’s a difference between just losing and being unfairly taken advantage of. People will just opt out of such things. Especially when there’s alternatives. DeFi can arguably be a better solution for a variety of transactions than our traditional systems. However, clearly there’s a few things still to work out and this is one of them.
In practice, MEV exploits, centralized relays, and opaque builder markets, (we haven’t discussed these last two), have reintroduced some problems of trust and power asymmetries, which is what crypto tries to get away from. It’s why things like MEV feel like a betrayal of these ideals. Because it is. Even so, at least it’s more in the open, unlike TradFi with dark pools, counterfeit shares, and so on. (Not all of this is illegal, like dark pools aren’t illegal, but are still opaque and a power asymmetry.)
So yes, crypto aspires to be permissionless and trustless, but reality is messy. Even if some of this is rehash, there’s some recent changes which is why I bothered reintroducing the issue. There’s hope. And it’s not just theoretical anymore. These tools are just becoming more accessible to typical users.
How You Can Protect Yourself and Help the Ecosystem
Even though MEV (Maximal Extractable Value) exploitation is a technical problem, there are steps users can take to protect their trades and reduce incentives for attackers. By adopting better tools and habits, you’re not just saving money, you’re helping DeFi evolve into a fairer system.
Here’s how:
Use MEV-Blocking RPCs (Remote Procedure Calls)
When you send a transaction using a wallet like MetaMask, it goes through an RPC endpoint, often a public one like Infura or Alchemy. By default, these expose your pending transaction to the mempool, where MEV bots can see and target it.
Consider switching to a private RPC that hides your transaction from the public mempool and sends it directly to miners or validators via protected relays:
Flashbots Protect and MEV Blocker, both launched in recent years, now offer public RPC endpoints that you can plug into MetaMask or Rabby. These keep your transactions out of the public mempool where sandwich bots lurk.
- Flashbots Protect RPC
- URL: https://rpc.flashbots.net
- Plug this into MetaMask under Settings → Networks → Add Network
- This keeps your transaction private until it’s included in a block
- MEV Blocker RPC
- URL: https://rpc.mevblocker.io
- A multi-relay service that routes your trades through MEV-protected infrastructure
- Also supports MetaMask, Rabby, and other wallets
These are free to use and require no extra steps once configured.
Trade Through MEV-Resistant DEX Aggregators
Some decentralized exchange (DEX) platforms are designed to avoid MEV by changing how trades are executed:
- CoW Swap
- Around since 2021 but only gained traction in 2023–2024.
- Uses batch auctions instead of individual transactions, meaning all trades in a batch are settled fairly with no advantage to sandwich bots
- Just connect your wallet and trade normally at cow.fi
- 1inch with MEV Protection
- Offers optional MEV protection routing
- When using 1inch, check if MEV protection is enabled in the swap UI (may depend on token pairs and network conditions)
- Again, just connect your wallet and trade normally at 1inch
- And in the background, (these aren’t consumer friendly yet), teams are working on intent-based architectures like Anoma and SUAVE, which aim to redesign DeFi trading from the ground up. These are not yet widely deployed, but represent the next phase of making MEV exploitation impossible by default.
Set a Low Slippage Tolerance
Slippage is the difference between the expected price of your trade and the actual execution price. High slippage tolerances give MEV bots room to profit off you.
- Set slippage to 0.1%–0.5% when possible (especially on well-traded pairs like ETH/USDC)
- On volatile or low-liquidity tokens, be extra cautious. High slippage opens you up to sandwiching
Most wallets and DEXs let you set slippage in the trade settings or gear icon before confirming.
Avoid Trading During Gas Spikes
When Ethereum network gas fees surge, MEV bots are more active, competing aggressively to include profitable bundles. This makes front-running more common and costly.
To avoid this:
- Check gas fees using tools like etherscan.io/gastracker (and check your wallets or trade platforms as they may show current gas prices.)
- Trade when base fees are lower – typically early mornings or weekends (UTC)
- Avoid trading during major token launches or market news spikes
Why Not Send All Transactions Direct to Block Builders
It takes time for things to evolve. Most wallets send things to a public mempool by default. The public mempool is valuable primarily because it aligns with the ideals of a public blockchain: transparency, openness, and neutrality. But like many ideals, it comes with tradeoffs. We get transparency & auditability, open participation and more. Also, some transactions benefit from being public. Bots, arbitrageurs, and advanced DeFi protocols rely on public mempool visibility for coordination. Hiding all transactions could harm market efficiency or break existing protocols that depend on real-time data. Unfortunately, these structures for now still leave vectors for some forms of abuse. The great thing about crypto though, is it’s likely to be self-healing faster than what we’ve seen in TradFi. We’ll see.
Wrapping Up
By doing using some of these techniques, you’re not only protecting your own trades, you’re making sandwich attacks less profitable and encouraging healthier infrastructure. That’s how DeFi gets better for everyone.
The crypto world has come far, but the sandwich irony remains: the very infrastructure meant to make finance fairer can still enable old-school exploitation in new-school ways. The good news is that the tools to defend against it are finally catching up. Small retail traders can’t fix everything, but we can at least try to stop feeding the bots.
At the very least, don’t be the whole sandwich. There’s an old expression I’ve always thought was somewhat funny, but maybe wrong. “Sometimes you’re the windshield, sometimes you’re the bug.” I’m thinking that’s a bit extreme. Life can be simpler. “Sometimes I just want to get to where I’m going… I don’t want to get hurt nor do I want to hurt anyone else. I just want to get there. I just have to go the right way.”
See Also:
Profitability of collusive sandwich attack in automated market maker-based decentralized exchanges
The most common types of MEV and protection from toxic strategies
What Is a Sandwich Attack in Crypto?
Sandwich attacks on BNB Chain rise again
Maximal Extractable Value Implications for crypto markets
DeFi user loses over $700K USDC in a sandwich attack that experts suggest could be money laundering
Philosophical Bonus: I briefly mentioned how some international concerns might exist regarding U.S. Cryptomercantilism. What’s really interesting about some of that isn’t just the idea of crypto alone. It goes to very large scale issues of how tech platforms can and often do ignore or destroy border issues and have impact on what used to be more sovereign cultural and policy matters. This isn’t just about crypto. Or AI. But there’s one perspective on AI that covers the larger scale worldwide challenge. Consider picking up The Age of AI: And Our Human Future, by Henry A Kissinger, Eric Schmidt, and Daniel Huttenlocher. It’s a 2023 book, but even more pertinent today than when written.