The MEV roadmap everyone’s been waiting for

How should you get started with your journey into MEV? The complete guide to becoming an expert as quickly as possible

Solid Quant
7 min readAug 7, 2023
Source: Wallpapercave

Introduction

After setting foot on MEV land, I had to stumble through the bushes all on my own. There were bits and pieces of information spread out across the web, and to be honest, it was a bit too overwhelming for me.

I am no expert in either computer science or mathematics, both of which become more important as you go deeper into MEV.

To start with, you needed a firm understanding of Blockchains — starting from Bitcoin, Ethereum, then to rollups to understand the ecosystem well. But I gave up halfway through because, as interesting as those topics were, you didn’t have to become a Blockchain expert to start trading.

Then, you also needed to have some familiarity with mathematical notations, which is pretty daunting for a social science major like me because I didn’t take up any math classes beyond that of Calculus and Statistics. Heck, I studied Linear Algebra on my own when I was in college watching Khan Academy.

“So, what’s the minimum amount of knowledge you need to build a working bot?”

If this kind of sounds like where you’re at right now, or if you’ve got programming/math covered but just want to find out what all the fuss about MEV is about, then you’ve come to the right place. In this post, you will get an overview of what it takes to become an MEV searcher.

Welcome to the world of MEV. This post will act as your base camp.

It’s actually Everest Base Camp

The first thing you do is go find yourself a companion:

Pick a language, any language, because it doesn’t matter at this point. Each of these languages has the potential to outperform the others in different aspects, they’ve all got their pros and cons. I picked Python personally, because it’s the programming language I love the most.

In the next blog post, I will share the base MEV templates for the three programming languages. These templates will include all the necessary modules required to start trading and capturing MEV. Each template will have async data streams, contract interaction functions, Flashbots request modules, and so on and so forth.

⚡️💥 If you are interested, join our Discord community where we share our ideas and grow as a team together. Talk to like-minded people, ask them anything, and share your insights 🏄🏻 🏄🏻‍♂️:

Now that you’ve picked your starting kit, what happens next? An overview of what will come next will be provided below:

1. Blockchain ⛓:

Having a firm understanding of blockchain technology, in general, is a must if you want to go far.

If MEV weren’t decentralized, though, it would actually be easier. You wouldn’t need to worry about how the CeFi financial infrastructure works under the hood because the institutions would take care of it for you. (They wouldn’t tell you the details anyway, even if you asked.) And in most cases, the rules are pretty simple: more capital, more speed, you’re our VIP.

DeFi is a bit different. There are so many moving parts to the MEV supply chain + Blockchain tech, all of which can be flexibly customized by the user, that not understanding their roles properly can sometimes come back and bite you. Moreover, you should know that there are a lot of alphas within the blockchain stack that you might be missing out on.

2. Decentralized Apps 🌎:

We are always interacting with dApps in the MEV world. Knowing how our counterparties work is also a must. But, these protocols don’t share the same ideas or the same codebase, so it’s impossible to learn all of them at once. Start with the essentials: Uniswap, Curve, Aave, Maker, etc.

3. Smart Contract 🔐:

Why learn to code smart contracts when we are just doing MEV? Because like it or not, we will need to read a lot of smart contracts, and also create our bot contracts implementing swaps, liquidity adding, burns, minting, and flashloans.

4. Flashbots 🤖:

Flashbots changed the MEV game forever. They formed communities around the world where people worked hand in hand to understand the blockchain market inefficiencies. This opened a whole new world of opportunities and sparked the MEV renaissance — the tide we are on as we speak.

Understanding their work and how much influence these technologies have on other blockchain ecosystems alike is crucial to moving forward. You may never be able to execute a single trade with your MEV bot if you don’t use their tech stack.

5. Market Theory 📈:

The difficult part of of being an MEV searcher is having to master everything from programming, security, blockchains, smart contracts, and on top of that: financial/market theories.

MEV strategies deal with financial instruments within a system that is highly correlated to the world markets. It is essential that we understand basic market/trading theory to have an edge over others.

6. Strategies 🚀:

This, IMO, is the least important of all.

Scroll down a little and look at all the strategies that exist in the MEV world, even this is a small subset of the whole picture. Give these strategies a quick look and imagine how they might be implemented. All strategies here will share 80% of the codebase.

They’ll all need to:

  1. asynchronously stream new headers data to get informed of a new block that was added,
  2. be able to subscribe to new event/logs when a transaction is added to a block,
  3. be able to retrieve past logs,
  4. interact with smart contracts using ABIs, plus function call encoding and response decoding,

I can go on and list more, but the gist here is that MEV strategies are simply the product of essential building blocks put together.

But it’s always good to start with a single strategy to understand how all the components work together. So we will start implementing the base strategies: DEX arbitrage, Sandwich, NFT arbitrage, mev-share arbitrage together first, then move on to more advanced MEV strategies like: CEX-DEX arbitrage.

As you can see from all the scrolling, there’s a ton 🛢 of stuff you have to know to capture MEV opportunities. It’s not something anyone can do lightheartedly.

But what if I told you that, as hard as it may all seem, you can actually just focus on the essentials and skip the parts that aren’t necessary for building MEV bots, and you’ll have your bots running in just three months, at most.

If we think about it, three months is actually a very short amount of time. So, some people will scoff at the idea, but that’s why we concentrate on the essentials, the essentials that we’ll study and implement together.

Come join me on a little fishing time for a second. 🐠

http://www.thesportfisher.com/

How many fish do you think you can catch with that fishing pole? I know I’ll catch none, because I don’t know how to fish. But that pole in the hands of an expert will be like magic. You’ll eat so much fish together that you’ll start to think that the pole may be the trick to it all. But we all know that it’s not.

Some people ask me why I open up so much. The answer to that question is quite simple. What I write in these posts, what I reveal on my Github will yield different results for everyone, because we all have a different level of understanding and creativity.

“Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.”

I hope to build a community of quants that can take the role of a lighthouse for people navigating into the space. Anyone interested in building amazing MEV tools and strategies together, follow me on Medium and join the fun! 🙏

Let me show you a quick peek at what we’ll all become in a few months:

I’ll see you in the next posts! Always grateful that so many people are reading my posts :)

--

--