How does Flashbots Work and How to Use it?

Written By
Erik
First Published
November 2, 2022
Last Updated
April 19, 2023
Estimated Reading Time
4 minutes
What is Flashbots
In this article...

Flashbots is an organization that wants to democratize MEV (Maximum Extractable Value) opportunities. In practice, this means that ordinary users who transact on Ethereum have ‘mempool privacy’ and pay a lower fee for their transactions. How does Flashbots work and how can you use it?

Ethereum is much more complex than Bitcoin because of all its possibilities of smart contract transactions. That is why selecting and ordering transactions into blocks has become a science (or art) that only few master. Those who do it well can extract a lot of fees by, for example, front-running trades. This requires a bit more explanation of what MEV is.

Maximal Extractable Value (MEV) is the potential profit that Ethereum validators can scoop up adding blocks to a blockchain. They can maximize the money they make from block creation by reordering transactions within blocks and even insert new ones. It’s a form of legal insider trading. Why insider trading? After all, the mempool (waiting line of transactions) is public, right? Well, theoretically, it is indeed open to anyone. But only few experts have the advanced skill set of how to interpret and benefit from these data. These experts make the profits.

As someone has to pay for these advanced traders’ profits, we can view MEV as a tax on users. The Ethereum community is working hard on a new and more fair system of MEV. Flashbots arose from this ambition. It is by far the biggest player in this new, ‘corporate’ MEV industry: it has 80% market share.

Flashbots aims to solve the following problems related to MEV:

  • Unfair distribution of MEV profits to insiders only (the insiders being the people who can read and execute code)
  • Clogging of the Ethereum blockchain, by all the MEV transactions

How does Flashbots Work?

What is the main invention of Flashbots? Instead of passing through the public mempool, transactions go to a relayer, where they are not visible to the public. The relayer sends candidate blocks to the validator (proposer), who can pick one. The validator can’t see the transactions; it only sees how profitable different blocks are. This process is detailed in the section below.

What are Flashbots Auctions?

Flashbots Auctions are a new way to get from candidate transactions to a new block on the Ethereum blockchain. Privacy (an invisible mempool) is key.

Flashbots auctions

Architecture of Flashbots auctions (source: flashbots.net)

The searchers in this architecture are any Ethereum users that want privacy for their transactions. For example, Uniswap traders who want to be protected against frontrunning. Searchers can also be bot operators/ bots that want to do arbitrage trading. 

  1. Searchers send their bundles (transactions) directly to block builders, meaning NOT via a publicly accessible mempool. Why are they called bundles? Because in many cases, traders want to make sure a series of transactions is executed in a specific order, in a single block. 
  2. The builders are specialists in building blocks that are profitable. 
  3. The relayers escrow these blocks, forwarding the profit that can be made without showing the content of the blocks. As a final step before validators (proposers) propose a block to the Ethereum blockchain, MEV-boost is the step where the most profitable blocks from each relayer are compared (see image below).
  4. With MEV-Boost, validators can access blocks from a marketplace of builders.
  5. In the final step of MEV-boost, validators can access blocks from a marketplace of builders. It is run by validators. 
how to use flashbots

The path from relays to inclusion in the Ethereum blockchain (source: flashbots.net)

MEV-boost was built by Flashbots as an implementation of proposer-builder separation (PBS), the future Ethereum consensus mechanism that will isolate the building of blocks from transaction validation.

Advantages of Flashbots

Ok, let’s now get practical and highlight two benefits of Flashbots, by taking the example of NFT drops. NFT drops that are highly anticipated lead to gas wars, where normal users and bots scramble to outbid each other. How does participating in these drops through Flashbots help?

  1. The Flashbots architecture guarantees transaction privacy. You don’t want a bot to see your proposed gas price, and have it simply place a slightly higher bid.
  2. In Flashbots, there is no longer any risk of paying gas fees for transactions that don’t get through. Too often in the past, aspiring buyers of NFT drops have had to pay tons of gas (hundreds of dollars or more of ETH) without getting their hands on the desired NFT.

How to use Flashbots

Anyone can use Flashbots by adding the so-called Flashbots Protect RPC (Remote Procedure Call: a set of protocols that allow a client like MetaMask to interact with – for example – Ethereum.) to their wallet. This won’t change your transaction experience much and you can still check the status of your transaction on Etherscan. But behind the scenes, your transactions will skip the public mempool where hungry predators (searcher bots) are lurking.

Flashbots will determine for you if your transaction requires the Flashbots treatment or not. Why not, possibly? In some cases, there is no downside of sending your transaction directly to the mempool, which Flashbots will do in that case. This will save you time.

In general, you won’t need to choose a higher gas price than normal.

What is Flashbots Protect API?

Flashbots Protect API is an easy-to-use API that developers can integrate into their applications. Their users can then have their transactions sent to the Flashbots Network. The API abstracts away from the complexity and specificity that Flashbots also allows. For example, users are allowed to be very specific about their transactions: they can pick the exact block number that they want their transaction included in. The average developer or user might not want to be bothered by this.

How to Use Flashbots in MetaMask

To add Flashbots Protect RPC endpoint in MetaMask, follow these steps:

  1. Click on your RPC endpoint at the top of your MetaMask. By default it is set on Ethereum mainnet.
  2. Click “Custom RPC”
  3. Add https://rpc.flashbots.net with a chainID of 1 and currency of ETH.
  4. Click Save
flashbots

(image source: flashbots.net)

You can now trade through Flashbots on any decentralized exchange. For more detailed info, go to the quick start documentation on the Flashbots website.

Problems with Flashbots

The whole point of Flashbots was that MEV would become a free market. But, for a free market, there are currently too few players and too many black boxes. In other words, as Flashbots itself admits, there are currently centralization and trust issues with the architecture. It aims to solve these.

What issues are there currently? For example, the builders. ‘Builders have full view of incoming transactions, which gives them the power to frontrun, censor, etc.’ A similar issue exists with relays. There are only a handful of relays to choose from, posing centralization risks. They too see raw transaction data and could potentially front-run and censor themselves. It’s a matter of trade-offs. The public mempool was transparent but had its issues. By shielding this mempool and allowing a few specialized players to access it, this opens up another type of problem.

Talking about censorship: the majority of relays currently (November 2022) accepts only candidate blocks that are OFAC compliant. Meaning that transactions from addresses that are blacklisted by the OFAC (a financial watchdog of the US government), are not included. They will still get through as long as there are relays that are non-OFAC compliant.

Erik started as a freelance writer around the time Satoshi was brewing on the whitepaper.
As a crypto investor, he is class of 2020. More of a holder than a trader, but never shy to experiment with new protocols.

Discussion on "How does Flashbots Work and How to Use it?"
You must Subscribe or Login to post a comment.
Additional Resources
Subscribe Today!
Join Thousands Getting Free Insights

Join 190,000+ Investors Getting Free Insights

Privacy Policy

Who we are

Our website address is: https://larkdavis.org.

Comments

When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.

An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.

If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.

When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select “Remember Me”, your login will persist for two weeks. If you log out of your account, the login cookies will be removed.

If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.

These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.

For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where we send your data

Visitor comments may be checked through an automated spam detection service.

Boom! You're on the shortlist.

You just took the first step toward getting your project in front of one of the most engaged communities in crypto.
We're already diving into your details to see how we can best showcase your vision to our audience. You should hear from us within 2 business days to discuss strategy, availability, and next steps.
Let's build something legendary.

Join 190,000+ Investors Getting Free Insights