You’ve likely been curious about MEV bots if you’ve spent any length of time in crypto. MEV bots are both fascinating and frustrating. MEV stands for “Maximal Extractable Value,” and these bots are automated programs designed to squeeze as much profit as possible from blockchain transactions. But how do they work? And why do so many crypto traders call them “Sandwich Bots” or “Jarred From Subway“? Keep reading to find out.
Understanding the MEM Pool
To answer “What are MEV bots in crypto?” you first need to know about the MEM pool. Think of it as a waiting room where all pending transactions go before being added to the blockchain. Every time you send a transaction (like swapping tokens etc), it goes into the MEM pool. Miners or validators then pick up these transactions and include them in the next block.
The MEM pool is public. Anyone can see it, including MEV bots. And this is where the problems start. These bots scan the MEM pool nonstop to find new profitable opportunities. If the bots find a big transaction that could move the price of a token, they jump in to grab themselves a piece of the pie.
What Are MEV Bots Solana and How Do They Work?
MEV bots work similarly on most blockchains, including Solana. On Solana, transactions are fast and the network processes thousands of them per second. MEV bots on Solana monitor the network just like they do on Ethereum. The bots look for trades they can exploit by watching the MEM pool. The high speed of Solana makes it even more attractive for MEV bots since timing is everything in front-running. Solana is also an extremely cheap chain as far as fees go. This makes it even easier and cheaper for bots to run.
Front-Running and Sandwich Attacks Explained
One of the most common tricks MEV bots use is called front-running. Here’s how it works:
- A regular trader wants to buy a token and sends their transaction to the MEM pool (it is like a waiting room).
- The MEV bot sees the transaction before it’s confirmed on the MEM pool.
- The bot places its own buy order for the same token but at a higher gas fee, making sure it gets processed first.
- After the bot’s transaction goes through, the trader’s transaction pushes the token’s price up.
- The bot immediately sells the token at a higher price, making a quick profit. The bot is making a profit off of this single buy. That is why it is called a “sandwich bot” because it sandwiches the normal traders buy by buying before their transaction confirms and selling immediately after the transaction confirms. In the order book, you can visually see your buy being sandwiched.
This type of front-running sandwiches the original trader’s transaction. This is why people call these bots “Sandwich Bots.” Some traders joke around about being “found by Jarred From Subway” when they see their trades getting front-run. It’s an annoying problem for anyone trying to trade on decentralized exchanges (DEX). It also costs regular traders a lot of money. MEV bots can easily suppress the price of a chart, especially on tokens that have a lower volume.
Why Are These Bots Everywhere?
Years ago, MEV bots weren’t as common. The crypto space was smaller, and fewer people knew how to program these bots. But as cryptocurrency grew, so did the number of bots. Any token with decent trading volume now attracts a swarm of MEV bots. These bots are all competing to squeeze out profits. Many times the profit isn’t much, but over the course of many transactions a day these profits add up. You may see someone buy $10,000 of a particular token and immediately sell for a $100 profit, sometimes even less.
The bots are set up by programmers who connect them to the MEM pool. They write algorithms to identify profitable trades and use high gas fees to prioritize their transactions. Once deployed, the bots run automatically, scanning the MEM pool and executing trades without any human input.
How MEV Bots Drain Liquidity
Liquidity is the lifeblood of decentralized exchanges. It’s the pool of tokens that traders use to swap one cryptocurrency for another. When MEV bots front-run trades, they drain liquidity from these pools. Here’s why it causes problems:
- Traders pay more: Regular users end up buying tokens at falsely inflated prices or selling at lower prices because the bots manipulate the market.
- Liquidity providers lose: The people who provide tokens to the pools often make less money because the bots take profits that would otherwise go to them.
- Ecosystems suffer: When bots dominate, it can discourage regular users from trading and this hurts the entire decentralized exchange.
How the Crypto Industry is Fighting Back Against MEV Bots
Here are some of the ideas floating around:
Private MEM Pools
Some projects are creating private versions of the MEM pool. These keep transactions hidden until they’re confirmed, making it harder for bots to front-run.
Batch Auctions
By processing multiple transactions at once, batch auctions make it harder for bots to manipulate prices.
MEV Protected DEXs
New decentralized exchanges are being built with features to prevent MEV attacks. Some things they are doing are setting limits on gas fees or randomizing transaction orders.
Watch the Order Book
Next time you trade, watch the order book closely because you never know when “Jarred From Subway” might show up. Also, watch your slippage because the higher your slippage is, the easier it is for a MEV bot to front-run your transaction. And please make sure to plan your buys in small increments if you’re wanting to make a large buy. For example, if you were planning on buying $1000 worth of a smaller token with low liquidity and volume, then consider splitting your buys up by purchasing $100 at a time, or even in $50 increments. Good luck!