Appearance
What is Flashbots?
Flashbots is an ecosystem which provides Ethereum users with various benefits, most importantly frontrunning and transaction failure protection. Every transaction that you send using FlashBat uses the flashbots relay by default.
But how does it work?
Flashbots provides a private transaction pool combined with a sealed bid blockspace auction mechanism. Okay, but what does that mean exactly? Before transactions get confirmed on ethereum, they are stored in the public mempool. Transactions in the mempool are also called pending transactions. Each miner and eth node has a view of this mempool and can see which transactions are in it. This lets malicious actors front run other people. They watch the mempool for specific transactions and then send their own transaction. So, the private mempool that flashbots provides is only visible to the miners themselves. They need to see it to be able to include transactions into the next block. But they are the only ones, hence no one can see your transaction before it is mined/confirmed/included in a block.
Now onwards to the sealed bid auction. Miners are profit driven. They choose transactions mostly according to the amount of ETH they received in relation to the amount of gas that is used by the transaction. Before the miners mine a block, they simulate it exactly, which they can do because they know the order of the transaction. If a transaction fails in the simulation, then it will not be included in the block. This guarantees the transaction failure protection.
But we were talking about an auction, where does that fit in? We are gonna look at an example. Imagine two people sending transactions that exploit the same arbitrage opportunity to flashbots. Arbitrage opportunities can only be exploited once, as that transaction will balance the price again. Now if the flashbots relay would include both, the second one would fail (most arbitrageurs use reverts if the transaction is not profitable). Hence the miner cannot include both and because miners want to maximize their profit, they include the transaction which pays them more. I still did not mention the auction yet, but we have already seen it. The arbitrageur who paid the miner less lost the auction for the given arbitrage opportunity. It is calle sealed bid, because the transactions get sent to the private pool and no one (except the miner) can see how much other people are paying to get included in the next block.
From the Flashbots documentation: "Flashbots Auction is a permissionless, transparent, and fair ecosystem for efficient MEV extraction and frontrunning protection which preserves the ideals of Ethereum. Flashbots Auction provides a private communication channel between Ethereum users and miners for efficiently communicating preferred transaction order within a block."
For more info on how Flashbots works check out the official documentation.
FlashBat Docs