How to Build a Profitable MEV Arbitrage Bot: Go for Long Tail, Multi-Hop Arbitrage

Here's the only way to create an MEV bot in this day and age for arbitrage on crypto.

If you are on Ethereum, you've probably noticed that MEV bots are usually either arbitrage bots, sandwich bots or liquidation bots. Those are the most common categories. And there's nothing wrong with them. They are all good.

However, when someone wants to get into it and actually make money with arbitrage, they need to understand that the classic arbitrage, where we swap Ethereum for a token on one protocol like Uniswap and exchange those tokens back for Ethereum on another protocol like SushiSwap at a profit, that type of simple arbitrage is way too competitive. It's impossible to make a profit on that, because there are more sophisticated bots that not only do that, but also combine the code to implement sandwiching, liquidations, just-in-time liquidity and other types of MEV into one transaction. That way they can be extremely profitable, win the block auction and actually land their blocks before you.

You can send a transaction for a specific target doing a simple arbitrage as I mentioned. But you will always lose to more sophisticated bots. They already exist and they are making a lot of money that way.

So how do you actually make money with arbitrage?

Well, luckily you can still make money. And you can do that by going for the long tail MEV. That is looking for strategies where you go through multiple steps, multiple paths, multiple hops, and through tokens.

So instead of doing Ethereum for a token and the token for Ethereum, you go, let's say, token ABC for token Z, token Z for token W, token W for Tether, and Tether for token ABC, and a profit. You see? We went through like five steps. A more convoluted way, but that is way more profitable, and I'm telling you that it's not gonna be saturated. There are no bots that go through that.

I've seen bots that go stablecoin to token, then token to Ethereum and Ethereum to stablecoin with a profit. At the end they always want to return to the original coin. Or sometimes you can even use a coin at the beginning, like Tether, and get a different coin at the end, like Ethereum or Bitcoin, wrapped Bitcoin or something like that. You are still profiting, you're just getting a different coin. So keep that in mind. Those are the main ways to actually make a profit with arbitrage.

How do you find those opportunities?

Well, you've got to gather data, as always. Look for the swaps that have volume, like we're talking at least thousand dollar swaps, and see the ones that are not arbitraged. You need to build tools where you detect the bots, and see if the transactions you're targeting, where people are swapping more than a thousand dollars, are not arbitraged and are not using Ethereum as the initial coin, because that will be very competitive.

Then you observe those and see if there's a path. We take a snapshot of the blockchain state for that particular transaction, so we can look at all of the different platforms where that token can be swapped, like decentralized exchanges (DEXs) and maybe even centralized exchanges like KuCoin. And see, okay, this thousand dollar swap used coin A and got coin B. Those will be less common, but they will be more profitable.

So what do you do with that once you have that information? You simply take a look at potential arbitrage opportunities when a swap is made. Arbitrage is all about imbalances, where the same coin or the same path is on one decentralized exchange and another, and their prices differ. So if you find a multi-step path, multiple swaps in one arbitrage, then you can definitely be profitable, because not many people are doing it.

It has to be a repeatable process

Let's say you want to hold the coin DOGE instead of Ethereum, and you want to make a profit with that. Well, what you do is you look for all the swaps where DOGE is involved, buying or selling. And you look at all the different platforms where that coin can be traded. Then for every big swap you see, okay, has this been arbitraged? If the answer is no, and you see that repeatedly nobody is arbitraging those big swaps, then you are definitely onto something and you can look at the imbalances in different places.

Of course, arbitrage bots don't only work with Ethereum, they work with multiple coins. But they usually don't want to risk it. They don't want to hold an altcoin compared to holding Ethereum or Bitcoin or stablecoins. So you are at an advantage there, because you are equilibrating a market that not many arbitrage bots want to touch.

So yeah, that's how you do it. And it's the best way to actually make a profit.

Start simple and deploy on the same day

This is for advanced people. If you haven't built an arbitrage bot, you should start with the basic one, the simplest one, not with AI. It's very easy to build, and it's engaging and it's fun.

But you should be looking towards building something and deploying it as soon as possible, even if the profit is not there. You want to get into the markets ideally on the same day, meaning you create the bot and you launch it on that same day. You deploy it and you run it, because that will show you if your bot actually detects transactions, if it's able to execute them, what the gas costs are, and if you can even land your opportunities.

But of course it can be very frustrating, because when you start you will notice that your bot is not landing any bundles, any profitable bundles. And that's because your profit is way too small, others are taking it, and your strategy is too simple. When it comes to private mempools and Flashbots, you want to be profitable, and more profitable than the rest. So if you are starting, you cannot execute transactions that anybody can execute. You need to find and create bundles that can actually be executed by you.

But it's very exciting once you gather that data. You can observe and go for it. Like I said, your goal is to look for multi-hop swaps where you hold a coin, you go for another, then another, and then another, and then you get your final coin. That is way less competitive and that will make you more money.

An example you can do without writing code

So if you want to start, pick a coin that you like that's not Ethereum or a stablecoin or a big coin. Let's say the coin Useless. It had a very high market cap a while ago. Now not so high, but it's still a big coin that many people hold.

So let's say you hold that coin. You go to Etherscan and look at the swaps that were made. You look at the big swaps and you say, okay, let me find ten big swaps for Useless that were not arbitraged or sandwiched. Because if it's sandwiched, you cannot even make a profit even if you find the arbitrage opportunity, because some other bot is gonna take the opportunity for themselves.

So find ten big swaps of at least a thousand dollars each where the input coin is, in this case, Useless. And try to see if there is an imbalance in other markets, other decentralized exchanges, where the coin drifted for a while, and how long it took to rebalance.

You can do that without writing a single line of code. You can just observe and see all the places where Useless is traded. Let's say Uniswap, SushiSwap, KyberSwap, 1inch, CoinSwap, Binance and others, usually decentralized exchanges. You want to pick those. Then you pick a big swap, you note the time and the block timestamp, and you see how long it took to rebalance. Because every coin needs to be rebalanced, and if you're not doing it yourself, some other guy will be doing it. And they usually rebalance using Ethereum. They only do it after an Ethereum swap is done.

So that's how you do it. Implement these steps that I mentioned and you will be able to build a profitable arbitrage MEV bot in 2027. That way you will actually make money. But you have to actually do your research and validate that the opportunity is there and how much money you can make from it. Basically, once you find that, okay, Useless is on these five exchanges, and when a swap is made this exchange takes three minutes to update its price, then I can make money from that.

Watch out for the big bots

But yeah, I mean the market is very competitive. There are sandwich bots like Jared (jaredfromsubway.eth) and others that are aware of these opportunities. They hold big coins and they arbitrage those coins. So you've got to be very careful of that. That's why I said look for big coins and big swaps that don't get arbitraged effectively. You are working on inefficiencies, and that's where the money is made.

The bigger the inefficiency that you solve, the bigger the money you will make, even if it's just one swap a week. You can make a bot that is not very active. You can make one that makes one swap a month and you will still make money, because of how big the opportunity is.

Estimate the profit yourself

So go ahead and look at the data. Pick a coin that you like that not many people know or use, or maybe it's a bit dead, but there's still volume, there are still swaps made. Look at the big swaps and see if they were arbitraged and how fast they were arbitraged. Then estimate the profit yourself.

You can calculate it yourself. You can create a calculator with AI where you input the reserves at any given block height and determine the difference and the potential profit that you could have made arbitraging those two markets.

If you want to know more about MEV bots, make sure to subscribe and join the email list. It's right below, so you're welcome to join. And if you want to create your own bot, feel free to send me a message to book a call with me. The rate is $5,000 an hour. Have a nice day.

← All articles