Enter the MEV Void: the Rise of Flashbots

Wall Street, mid-2007; Brad Katsuyama worked as a stock trader for the Royal Bank of Canada (RBC), a big player in the U.S. banking industry, but nobody on Wall Street knew them. Katsuyama's troubles started when RBC paid $100 million for an electronic-trading firm, Carlin Financial.

Before the acquisition, Katsuyama would see on his screen 10,000 shares of Intel at $22, which meant he could buy 10,000 shares of Intel at $22 a share. He only needed to press a button to complete the trade. After the acquisition, every time he pushed the button, that offer would vanish, leaving him clueless. It happened to Katsuyama for almost two years, but not until after months of research and tests they realized he was being front-run.

Multiple brokers would sell their information on clients’ orders. Any institution that bought that information could get ahead on Katsuyama's trades, effectively buying out the stocks he wanted if they had a faster connection. It was a common practice in high-frequency trading, and it did not happen only to Katsuyama; it occurred to many Wall Street investors.

Brad Katsuyama, joined by other experts, opened his own Stock Exchange in 2013 called Investors Exchange (IEX). This exchange implemented multiple measures to make trading fair to all actors and continued trading millions of dollars in stocks daily. This story, Flash Boys, is described in Michael Lewis' book "Flash Boys: A Wall Street Revolt" based on real-life events.

Front-running is a predatory market behavior that arises due to information asymmetries created by different actors accessing privileged information. Front-running is one of the ways to access MEV, and selling clients' orders is equivalent to the public Ethereum mempool.

MEV In The Age Of Ethereum

To understand MEV, we should first remind ourselves how blocks are being built on Ethereum. After the Merge, the responsibility of proposing blocks lies on the Validators. To create a block, they include transactions picked from the mempool by using a "Greedy Algorithm" selecting first the transactions that pay the most. Therefore they have the power to decide which transactions to include in this block and their order of execution.

Maximal Extractable Value (MEV) is the potential economic benefit obtained by including, extracting, and reordering transactions in the proposed blocks. In reality, participants known as Searchers draw most of the value. They run complex strategies trying to read the data available on the blockchain to find different opportunities where they can make a profit. Most of these opportunities are finite, meaning there are only a certain number of prospects to be done in a particular time. This way, a zero-sum game is created where money is at stake, and only a few will get pieces of the prize. With that, MEV is a highly competitive space where Searchers want their transactions to exist in blocks (a scarce commodity) before or after others. Innately, participants will try to "bribe" block producers to get the outcome they want. This behavior creates multiple strategies around the software developed for these bots on-chain.

Since 2020 Ethereum usability and activity have grown, particularly with the adoption of DeFi protocols (a financial backend). These systems attracted a lot of liquidity and volume to the network, where people exchange tokens, take loans, and use other financial products. Therefore, like in any market, all markets created on top of Ethereum have information asymmetries and need market participants to make them healthy and efficient. The Searchers participate in these markets by finding profitable opportunities, sometimes helping the market and, in some cases, extracting value from other users.

Searchers center their strategies by trying to make the validator produce the blocks in a way to benefit them. This objective is why they need to maximize profit and use the least amount of gas possible. This way, they have a higher margin on how much they are willing to pay per gas unit.

What are these opportunities, and are they profitable?

There are many different types of strategies, but we could categorize them into two main categories according if they want to stand before or after other participants:

Front-running: A transaction wants to be included before others - to do so, it pays a higher gas price. This behavior could start a bidding war called Priority Gas Auction, where Searchers try to outbid their competitors to get the transaction first.

Some of the opportunities Searchers try to leverage with front-running are:

  • Arbitrage: This is one of the most straightforward and available MEV opportunities. The idea is to buy something at some price and sell it at a higher price almost immediately. Here is an example: Searching at the market price of ETH in two Decentralized Exchanges (DEXes), we noticed that it trades at 1000usd in DEX X and 1050usd in DEX Y. So the opportunity consists of buying in DEX X and selling in DEX Y, taking a profit of 50usd per ETH.

  • Generalized Front-runners: The job of these bots consists of copying opportunities from other Searchers. They are constantly analyzing the mempool and reading all the transactions. Once they see a profitable operation, they run it locally to verify the opportunity, copy it, and submit their own with a higher gas fee. There are multiple examples of front-running, such as this video that shows a front-running example in real-time.

Back-running: Including, or trying to, a transaction after others - this is done by paying a slightly lower gas price to get in the same block but right after others.

  • Liquidations: There are many different protocols on DeFi where a borrower can deposit assets as collateral and get an over-collateralized loan. These systems are stable because they loan less money than the total value in reserve. When a borrower's assets depreciate and the amount of loan value trespasses a threshold, the user gets liquidated. It means the protocol sells the collateral to maintain the system's health; it washes down the bad credit. Protocols rely on bots that enforce the liquidation on a specific account. For completing a liquidation, they receive a liquidation fee.

The Effect Of MEV

We have defined what MEV is, but we have not outlined the effects that MEV and extracting MEV have on both users and Ethereum as a network.

The Good

The first and foremost benefit of MEV is the MEV itself. This extractable value incentivizes miners and validators to keep running nodes. For example, validator clients that run MEV-Boost can increase staking rewards by 60%. This is especially important after the Merge, which lowered the block rewards.

Users can benefit from the effect MEV has on DeFi projects. Arbitrage ensures that users get the best prices for their tokens, and liquidations get faster due to liquidation bots.

The Bad

At the user level, front running and sandwich trading ultimately cause poor UX. Users who experience some form of front running or get sandwiched get worse trades. The crypto space will never scale if users have these kinds of experiences.

At the network level, front-running and priority gas auctions raise gas prices significantly, causing congestion and more expensive transactions. It becomes an entry barrier for new users, as high transaction costs deter users from using the network.

The Ugly

Blockchain blocks have an inherent MEV value. There could be past opportunities for arbitrage stored there. It could be tempting for miners or validators to perform a Time-Bandit Attack when that accumulated value becomes more significant than the block reward. A Time-Bandit Attack is a kind of attack that occurs when miners rewrite the blockchain history to steal funds stored in previous blocks. In this case, miners could attempt to rewrite the block order to obtain profits from an older arbitrage opportunity. The effects of that attack can destabilize consensus within the network.

Although MEV can have a positive impact, the consequences outweigh the benefits, especially in user experience.

Enter Flashbots

As the so-called “MEV crisis” arose in 2020, researchers, crypto experts, and hackers came together to shed light on this ever-growing problem and mitigate its effects. This group eventually formed Flashbots.

Flashbots is a research and development organization formed to reduce the negative externalities of MEV. They base their focus on three pillars:

  • Illuminate: bringing transparency to the MEV activity.

  • Democratize: democratizing access to the MEV revenue.

  • Distribute: enabling a sustainable distribution of the MEV revenue.

To achieve their goals, they base their activities on two fields: product and research. Flashbots products build the core infrastructure and tooling to redefine block production supply across blockchains. Flashbots research explores MEV, its market dynamics, and blockchains altogether.

Research

Flashbots research is dedicated mainly to understanding and uncovering questions relevant to every term of the future of the MEV ecosystem. The ten main research priorities are:

  • Auction design

  • MEV on ETH2

  • Cryptographic privacy

  • MEV in L2

  • Crypto economic privacy

  • Account abstraction

  • MEV taxonomy

  • Protocol design

  • Flashbots as critical infrastructure

  • Search optimization

The research process consists of an in-house method and the Flashbots Research Proposals (FRPs).

The FRP process is a collaborative research process funded with the MEV Fellowship Grants that is open and modeled upon the Ethereum Improvement Proposal (EIP), taking inspiration from applied and academic research.

The different stages of an FRP are as follows:

Flashbots Research Proposal (FRP) stage lifecycle.
Flashbots Research Proposal (FRP) stage lifecycle.
  • Draft: the first stage of development. An FRP is merged by an FRP editor into the FRP repository when formatted correctly. At this stage, the draft may be undergoing revisions and changes.

  • Review: an FRP author marks an FRP as ready to be peer-reviewed.

  • Accepted: these are a work in progress until incorporated into the research papers.

  • Withdrawn: the author(s) decide to pull out the proposed FRP. A new idea is considered a new proposal, and the previous proposal number or state can no longer be recovered.

  • Completed: the work associated with the FRP has been merged into either the Flashbots Research Paper and published independently or just one of the two. Otherwise deemed as completed by the FRP editors.

  • Stagnant: if an FRP remains inactive or unaccepted for an interval greater than six months, it gets moved to the stagnant stage. It can be resurrected by the Authors or FRP editors if moved back to either Draft or Withdrawn states.

If you want to create a Flashbots Research Paper, there is a template to follow.

Products

Flashbots Auction

The Flashbots Auction is an ecosystem for efficient MEV extraction and front-running protection on Ethereum. It started by working with MEV-Geth, the Flashbots fork of Geth, but in PoS Ethereum, it now works with MEV-Boost.

In a regular Ethereum transaction pool, users submit their transactions, which get broadcasted to other nodes publicly. This behavior can ultimately lead to front-running opportunities. Flashbots Auction introduces a private mempool and a sealed block space auction, which maximizes validator payoffs and eliminates front-running vulnerabilities.

MEV-Boost

MEV-Boost is an out-of-protocol implementation of proposer-builder separation (PBS) for Proof-of-Stake Ethereum. Under this scheme, block proposers rely on a market of block builders offering blocks along with a fee. The only job of the proposer is to select and propose the block offered with the highest fee. MEV-Boost instances connect to block builders via relayers for the supply of blocks.

MEV-Boost has gained a lot of traction since the Ethereum Merge. The measure of adoption is the percentage of Ethereum validators running the software. Since the Ethereum Merge on September 15th, nearly one month ago, MEV-Boost has tripled registered validators to around 60%.

Percentage of validators running MEV-Boost post Ethereum Merge. Data collected by the publishing team.
Percentage of validators running MEV-Boost post Ethereum Merge. Data collected by the publishing team.

Flashbots Protect

The Flashbots RPC Endpoint is their public server used as an endpoint for Ethereum wallets. This endpoint serves as front-running and failed transaction protection. These transactions will not be sent to the public mempool for front-runners to find. Users are protected from failed transactions as they will only pay for successful transactions and not reverted transactions.

There are some disadvantages when using this RPC endpoint. The main drawback is the increased latency, which could prevent some users from using it.

Flashbots Data

Flashbots Data is a series of tools, dashboards, and APIs to improve the transparency of MEV activity on Ethereum and the Flashbots Auction. Some examples are the MEV Explore Dashboard, the MEV Blocks API, and the Transparency Dashboard, among others.

Quick Technical Analysis Of The Flashbots Products

Although The Merge has not rendered PoW obsolete in Ethereum, there is still PoW Ethereum and Ethereum Classic running on PoW consensus; we have much more to analyze in the MEV-Boost product. Our technical analysis focuses mainly on that repository and infrastructure.

MEV-Boost

In a quick overview, the repository has some frequent activity, and a bunch of contributors appears listed (around 23 of them at the time of writing). When digging deeper, one can see that from those 23 contributors, only four have added more than 1,000 lines. Of those four, one has done the heavy lifting at the start of the project (jparyani), and another is currently doing most of the maintenance (metachris). It means there are mainly, at most, one or two people working on this codebase.

In terms of the repository quality, there is no apparent commit convention or semantic structure to them. Contributors follow no naming convention for commits whatsoever. They do have tests in place, which have an 85% of code coverage (we run the tests ourselves and can confirm that number).

It is a significant factor, especially on a product relied on by a large part of the Ethereum community, that MEV-Boost has had at least one audit. There is no information on other audits on this product or any others.

MEV-Geth

MEV-Geth is a fork from the Geth implementation for the execution layer of the Ethereum Protocol.

In this case, given it is a fork from another repository, there is no clear list of contributors. We did manage to find the fork date using the Github API, and then we got a list of contributors since that date. According to that list, it has around eight main contributors, although it appears there has not been any development in the past month, which could be because of The Merge.

We could not find any test metrics to comment on, but it appears they use some convention when naming their commits.

Flashbots Protect

The Flashbots RPC Endpoint is their public server used as an endpoint for Ethereum wallets.

Similarly to MEV-Boost, the repository has one or two main contributors that do most of the work. They do not use commit-naming conventions but have tests in place for the codebase.

The Team Behind It.

Flashbots is not your ordinary business organization. Apart from being fully remote, they base their principles on those of a Pirate Hacker Collective. Given this, they do not have an ordinary structure where you can find a CEO. As they mention in one of their initial publications, "Flashbots—Front-running the MEV Crisis.", the organization is "stewarded" by a select group of experts, and one can participate (or be employed by it) through different means.

This organization is relatively new and does not disclose information (other than a couple of names) about the team. From our research, some sites like CypherHunter have a reduced list of members, while others like LinkedIn show more. The takeaway is that when researching the founding members of Flashbots, one can find that they have impressive experience in the area and have worked together before Flashbots on some occasions. Although some of the members are known, others remain fully anonymous.

Even though Flashbots does not work as a regular company and focuses on research, infrastructure is one of its most significant responsibilities. The team develops and manages the software for validators, relayers, and infrastructure.

Funding

Flashbots is funded, according to their documentation, by Paradigm. Paradigm has an immense portfolio of crypto investments in the Web3 ecosystem. Having the support of this investment firm validates Flashbots' value they offer.

As far as the information they disclose, Flashbots did not have any grants offered to them. As a matter of fact, they give away grants to researchers through the MEV Fellowship Grants.

One of the main concerns of the ecosystem, and even Flashbot's employees, is profitability. When will VCs start asking for the company to make some revenue? The official claim says that VCs invested in fixing Ethereum, thus protecting their ETH investment. Currently, we cannot verify this claim.

Community

One can not only participate in the Flashbots community by contributing to their Open Source tools, but they also have an extremely active Discord server where one can ask questions about the products and submit research, among many other things.

To go above and beyond, Flashbots even has a Whitehat Hotline you can refer to for help in case your wallet is compromised.

Why Is it Important?

Before Flashbots, it was a given you might get front-run or face a sandwich attack when trying to send a public transaction that could have a financial reward. At that point, you would either send a transaction hoping you would not get front-run, or you had to build complex Smart Contracts and collaborate directly with mining pools to have a chance of beating the front-runners.

Flashbots, with all its products and research, made it possible to solve the gas war that raged through Ethereum. At the same time, they gave birth to the study of MEV and its quantification. One might believe that MEV does not affect them or that you are not a Flashbots user. In reality, everyone could be a Flashbots user. End users can use Flashbots Protect for front-running protection, miners or validators can use MEV-Geth or MEV-Boost, and bot developers can leverage MEV research.

Flashbots Are Not All Roses.

Front-running

Although Flashbots might have solved the MEV crisis or helped mitigate the effects of MEV, it is worth noting they did not eliminate front-running. People still get front-run every minute in Ethereum. The Open Source nature of Flashbots made front-running more accessible to everybody. Even though Flashbots does not promote front-running, they create and publish different bots and MEV opportunities as part of their democratization of MEV.

Given more people having access to these bots, front-running has increased. This increase in front-running activity increments the competition within the field as well. Since the publication of "Flash Boys 2.0", where one of the co-founders of Flashbots, Phil Daian, describes the market dynamics of MEV, these bots have been called the new Flash Boys (hence the Flash Boys intro). As this Bloomberg story details, high-frequency trading through arbitrage bots is still raging, with no signs of slowing down.

Censorship

Flashbots has been under the spotlight for the allegations of the high centralization of their infrastructure. Seven active relays exist, and at least 80% of the proposed blocks come from one relay owned by Flashbots at the time of writing. Multiple trackers have launched since the Ethereum Merge wanting to shed light on block statistics.

Tornado Cash, the protocol for making Ethereum transactions private, was blacklisted by the U.S. Treasury’s Office of Foreign Asset Control (OFAC) in August 2022. Given that Flashbots has a US-based team, they had to accelerate their plans to Open-Source the MEV-Boost code and produce OFAC-compliant blocks. OFAC-compliant blocks censor Tornado Cash transactions and blacklisted wallets. The latter has been one of the main centralization issues because at least 45% of the blocks proposed post-Merge are OFAC-compliant. Flashbots responsibility for their infrastructure means they need to comply with the regulations where the infrastructure and the team reside. This responsibility is why Flashbots decided to build OFAC-compliant blocks, especially after the Tornado Cash incidents. Centralization fear has been preoccupying users amid the potential for censorship.

There are other relay options, some of which do not produce OFAC-compliant blocks. The question that arises is: why do validators use the Flashbots relay? There is no easy answer to that question, but the main points could be infrastructure requirements and confidence in the Flashbots team. There is light at the end of the tunnel; among the newer relays, a good portion has gained traction and does not produce OFAC-compliant blocks.

What does the future hold?

As we mentioned, MEV has always been there, and Flashbots is just helping illuminate, democratize, and distribute it. Developments around MEV arise daily, and the Flashbots Discord server proves that; daily news, dashboards, and products appear there. The panorama is constantly changing. Multiple users still get front-run and face losses each minute, so there is still room for development.

Future Proposals

The community is evaluating and proposing new improvements and designs to continue minimizing MEV and resolving censorship issues. Some of the improvements are:

  1. Fair ordering: The main idea is to order transactions by time instead of allowing users to pay more for their transactions.

  2. Lists: Validators will only accept the blocks provided by the builder if it includes several transactions presented from a list. These transactions are chosen from the public mempool.

  3. SUAVE: The most recent improvement by the Flashbots team. They want to build an entirely new protocol aiming for decentralization and privacy. These protocols would include a private mempool (could use Encryption Threshold), decentralized builders, and L2 in mind. Also one of the objectives is to maximize competition and geographical diversity (due to regulatory concerns). 

There are many more proposals by the community and multiple projects with different approaches to solving the same problem. There is an enormous effort in the whole ecosystem to work together and discuss this problem publicly to illuminate MEV.

Competitors

The rise of Flashbots has sprouted an interest in MEV among the entire Web3 ecosystem. Competitors have appeared in Ethereum, such as Manifold, which competes with Flashbots in the block-building space with non-compliant OFAC blocks. There are others, like Omniatech, which provides a private mempool via an RPC endpoint anyone can use, and projects like CoW swap, which are pushing the space to design protocols with MEV minimization in mind. Flashbots only works in Ethereum, but similar ventures like Jito and Skip aim to do Flashbots' job in the Solana and Cosmos chains, respectively.

Subscribe to ghirsch.eth
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.