Flashbots: MEV Pi-Rate Ship

Abdul Qadir   |   

Mar 09, 2022

Mar 09, 2022

Extracting MEV incurs externalities, like increasing the congestion of the network and gas wars which eventually increase gas costs for all users. Nevertheless, in less than two years, more or less $700 million worth of MEV is extracted from the dark forest of Ethereum and still counting. According to flashbots explorer, the number of MEV opportunities has increased exponentially at the start of 2021 after the boom of Defi and Nfts. 
As the adoption increases, the number of bots and their Priority Gas Auction (PGA) gas wars also increase, making the network more congested.

New to MEV? Read MEV: Explain Like I Am Five

Is Mev a problem to be solved or a reality to live with?

There are currently two schools of thought in the world of Mev. First, minimize Mev as much as possible by creating a more secure system and application layer. Second, we cannot minimize, democratize, and make Mev less evil. By making ease and providing users equal power to grab the Mev opportunity.

What are Flashbots?

Flashbots is a research and development organization formed to mitigate the negative externalities and existential risks posed by miner-extractable value (MEV) to smart-contract blockchains. They propose a permissionless, transparent, and fair ecosystem for Mev extraction to reinforce the Ethereum ideals.  

They solved the vast problem of Ethereum dark forest, network congestion, and PGA's by democratizing the Extraction and distributed benefits. All parties rely on each other and maintain a source of communication for the sealed bid auction of the transaction. First, searchers find the optimal transaction/opportunity and, after creating a bundle, send it to the relayers that transmit the transaction to the MEV-Geth miner. Finally, they add it after looking into the incentives.

Around 90% of the miners have adopted the Flashbots to earn extra incentives other than the block incentives.

Core Features

Flashbots focuses on two main sub-divisions. Both are tightly-coupled dual engines that propel the organization in a phased approach. First, they are focused on enhancing the architecture and research of the Flashbots product. Research parts help redesign problems in the current architecture of the Flashbots products and MEV problems. Second, Flashbots is also open source and allows people to propose an architecture.

  • Research: It is an open, transparent, and collaborative effort to tackle short and long-term research questions relevant to MEV.
  • Product: It is an engineering effort to build products to fulfill our mission. It includes the Flashbots Auction with the Flashbots Relay, the Flashbots Protect RPC, MEV-Inspect, MEV-Explore, and MEV-Boost.

Flashbots Data

FlashbotsData enables the visualization of MEV metrics over time. Flashbots uses it to understand the MEV ecosystem better and provide it to the community to eradicate information asymmetry. The Flashbots Protect RPC, MEV-Inspect, MEV-Explore are some of its parts.

Flashbots MEV-Inspect

MEV-Inspect is an MEV inspector for Ethereum; it scraps the Ethereum blocks transaction and internal transaction for the three things:

  • miner payments (gas + coinbase)
  • tokens transfers and profit
  • swaps and arbitrages

All data after scrapping gets stored in Postgres for querying and analysis. Flashbots have the inspect library written in rust inspect.rs. However, they are moving towards python for more accuracy of the crawler.

Flashbots Explorer

What cannot be measured cannot be improved. MEV explorer plays a vital role in inspecting the increasing hype and MEV on the Ethereum chain. It is a dashboard for visualization of MEV bundle and MEV leaks. The data includes different strategies to get the total Realized Extractibel Value (REV) value from dex arbitrage, multi-chain arbitrage, liquidation, and sandwich attacks.

Flashbots team is actively working on the MEV explorer. They have recently launched their v1 of the explorer for better matrices and visualization of the MEV on the Ethereum network.

Flashbots Protect

Flashbots Protect consists of two things. First, Flashbots Protect API and Flashbots Protect RPC are simple tools for developers to send the transaction to Flashbots and use in their wallets. The transaction goes through the private mempool instead of exposing it to the public mempool. Users can also cancel their transactions anytime. Moreover, Users benefit from two other key features of Flashbots:

  •  No cost for failed transactions
  •  Priority in blocks

Flashbots Auction

This is a permissionless, transparent, and fair ecosystem for efficient MEV extraction and front-running protection which preserves the ideals of Ethereum. Flashbots Auction is basically the private communication channel between Ethereum users and miners. Searchers directly communicate with miners to add their transactions in the preferred block without exposing them to the public mempool. Instead, the transaction goes through the private mempool. The miner picks the transaction and adds it to the block user based on his incentive. Allowing block producers to be trustless outsource the work of finding optimal block construction.

Flashbots Auction consists of MEV-Geth, a patch on top of the go-Ethereum Client, and MEV-relay, a transaction bundle relayer. The searcher sends the transaction to the MEV-relay, checking it before sending it to the miners. 

Searcher

The searcher is the Ethereum user who finds an opportunity and wants to execute it without exposing it to the public transaction mempool. Searchers send transactions to the centralized relayer integrated to stop the dos attack on the MEV-Geth side. Moreover, Searcher sent a bundle to the miner to see the incentive and close the bid after getting verified. 

Multiple Ethereum searchers monitor the Ethereum chain state and send bundles to relayers.

  • Users of Etherem want to get front-run protected and pass the dark forest without exposing their transactions.
  • Ethereum bot operators looking for fast, and risk-free access to block space (for example, arbitrage and liquidation bots)
  • Ethereum Dapps, like mistX, Yobot uses the Flashbots for the gasless transaction and to protect users from gas wars.

The information contained in the Flashbots bundle allows the searcher to express their block space importance relative to the state of the chain and the state of the transaction pool. It enables price discovery for discrete MEV opportunities instead of competition for priority along a single dimension. Using direct payments instead of gas prices allows users to make payments conditional on their transaction succeeding, thus avoiding paying for failed bids.

MEV-Relay

A relayer is a bundle propagation service that receives bundles from searchers and forwards them to miners.

A relayer is a central entity in charge of validating the incoming bundles from the searchers and routing them to the miners. In addition, the relayer makes sure that the searcher does not spam the network with invalid bundles, thus creating a denial of service attack against the miners. Relayers may also provide additional services like bundle merging and execution services which allow searchers to specialize.

Miners

A miner is a party who ultimately collects all the bundles and produces a block. Miners traditionally run the Go-Ethereum client and order transactions by gas price. However, miners connected to the Flashbots network run a version of the MEV-Geth Client maintained by Flashbots.  Miners get the transaction from the MEV-Relay, pick the most profitable bundles based on the first-price sealed-bid auction, and place it at the top of the block. In this case, miners earn extra incentives by adding the Flashbots bundles and mining the block.

Furthermore, the miner can evaluate all the bundles received and combine those that do not conflict to produce the most profitable block possible. 

MEV-Geth

MEV-Geth was the first significant effort of Flashbots to Democratize the MEV which is also the fork update of the go-Ethereum Client, which opens the gate of a sealed-bid block space auction. Furthermore, MEV-Geth provides a secure private communication channel between miners and searchers. MEV-Geth relieves the Ethereum network from the congestion as more bots and miners run the MEV-Geth node to get extra incentives to add their transaction to the desired block.

Although many miners have adopted the MEV-Geth Client, Flashbots have not minimized MEV but democratized it. Some may even argue that Flashbots auctions have increased MEV by making it easier for miners to extract the most value from users' transactions. However, Flashbots auctions are very efficient and relatively decentralized (because anyone can become any party in the Flashbots marketplace, meaning centralization via the existence of relayers is only driven by economies of scale)

Problems

However, Flashbots is working exception in democratizing the MEV. However, still, it is centralized and trustless. So, a miner has to trust the relayer not to send the wrong header transaction and make the dos attack. Also, searchers have to trust the miners not to front-run their transactions. So all parties have to rely on and trust each other and assume that the others will not do any evil thing. Miners have full access to bundle content and can arbitrarily reorder / For the duration of the Alpha, it is discouraged for searchers to integrate directly with miners as Flashbots cannot monitor their behavior.

Other than this, Flashbots is hard to adopt by the normal Ethereum users as there are no wallets currently supporting the Flashbots bundle. Instead, users have to write their custom scripts to send Flashbots bundles.

References

  1. Overview | Flashbots Docs
  2. Flashbots is a research and development organization
  3. MEV.wtf Summit Summary pt 1 - Femboy Capital
  4. Eth Research Flashbots

Written by

Researcher. Architect. Dabbling the blockchain and MEV world.

Similar Articles

January 9, 2021
Author: Zainab Hasan
January 28, 2021
Author: Zainab Hasan
March 15, 2021
Author: Zainab Hasan
1 2 3 16

Get notified on our latest Web3 researches and catch Xord at a glance.

    By checking this box , I agree to receive email communication from Xord.