An Open-Source MEV Engine in Typescript.

An Open-Source MEV Engine in Typescript.

To understand the power of a MEV bot engine that you can build upon we must first discuss what MEV is. For years, many referred to the concept as Miner Extractable Value. However, recently it has come to take on the more accurate meaning of Maximum Extractable Value. The value to realize is not simply limited to Miners; anyone can participate.

For years, many defended the idea that a significant majority of MEV accrues to Validators. In reality though, much of the MEV in the current market goes to bots operating as "protocol market makers" that work to balance the state of all the open primitives and protocols in the industry. These individuals and bots and referred to as Searchers.

MEV can be explained as running a transaction and immediately making more money than you spent. Sometimes it is simple. Sometimes it is complex. Sometimes it only requires a single trade. Sometimes it requires multiple. The conditions and precise specifications vary widely between strategies.

The Current State

With a general grasp on what MEV is, let's now catch you up on the current state of the market. It is vital to your success that you remain constantly aware of the current shape of activities outside your daily operations. There is a significant profit to be made and that means that an enormous amount of resources are devoted to securing that profit by each participating actor and party. If you do not stay learning someone will come in to steal your niche from you.

Thanks to the generous developers in this industry, you do not have to start from square one. There are many incredible resources and open-source implementations providing momentum that would have otherwise taken many months to build up. Your success in MEV is almost entirely driven by your awareness and knowledge. Therefore, it is important to inform yourself with every opportunity. When someone is talking about something that you can't parse and find meaning in, listen closely.

When you find a repository that does something in a unique way, mark it down and use the tricks that developer has found useful. There is no shame in it in chasing the logic and money. If you're reading this I probably don't need to tell you that, though. So, let's catch you up on a few surface level things.

The Competition

For the most lucrative transactions and strategies, there often exists a required bribeexternal link where the bot pays a piece of their margin to Validators incentivizing inclusion in the soonest block possible. Although this is the case, Validators don't do anything beyond perform their normal activities. When bribed, they do not receive a standard margin of the profit generated.

In practice, there could be little to no bribe included when it is not a market of high demand or competition. Many are quick to parrot that in theory a Searcher should be willing to pay up to 100% of their "profits" so that their transaction filled before anyone else. Rarely is that the case. Because there is so little competition, you are rarely required to actually operate with such a tight margin. The only places that you really ever see complete margin use is on very crowded strategies such as DEX arbitrageexternal link.

Before moving on it is important we cover one last thing. You will hear people reference Generalized Frontrunners constantly, which are bots aimed at finding profitable transactions in the mempool and executing it themselves before you do. Not only are these extremely rare, but they don't really exist in the way that people often speak or think of them.

How do we know this? Exploits happen almost daily. Yet, very few are caught and stopped in their tracks by a whitehat. Exploits are the most valuable transactions that could be captured and they fail to do so a vast majority of the time. Of course, with extremely simple transactions, one may be frontrunexternal link. But, unless you are doing a simple linear transaction that requires no predefined state such as token balances, role access, etc. you will likely never have first-hand experience with a bot of this nature.

The MEV market is not just filled with exceptionally talented individuals, but also intentional psyops and misinformation designed to keep the unknowing from entering and competing. There are social games played to trick you. The opportunity is larger and more accessible than you could ever imagine. Don't fall for it.

The Options and Resources

There are thousands of resources that will prove exceptionally valuable on your journey. Sometimes you will run across something that you are not yet able to fully comprehend. When this happens it is critical to read through it, note down the things you don't understand, and keep this lack of knowledge and understanding in your mind.

Don't obsess over comprehending everything immediately. Allow your knowledge to accumulate. Over the months the understanding will form on its own while you are focusing on the things that will actively make your strategies better.

As you are getting started, it can be difficult to wrap your head around the basic things. Below, we will cover a few priceless resources to improve your learning and success rate during the early days of your initial efforts: