Flashbots have made quite the news in Ethereum over the past few months because it has done a good job of reducing the gas fees on Ethereum. However, this is not the only thing that Flashbots can do for Ethereum. This article will cover everything you need to know about Flashbots and Ethereum.
What Are Flashbots?
Flashbots refers to a dev organization that has developed a program that attempts to reduce the miner extractable value (MEV) earned from arbitrage bots and transfer it to miners.
We know, this is a little complicated with the talk of arbitrage bots, miner extractable value, and what all this has to do with gas fees. Due to that, we will first explain what all of this stuff actually has to do with flashbots.
Ethereum Mining and Trading Terms Explained
Again, the whole idea of Flashbots is difficult to understand without an understanding about the problems facing Ethereum at the moment due to arbitrage bots and miners attempting to extract maximum value out of the entire situation. Here are the basics of the situation explained.
Arbitrage bots are simply programs that scan the Ethereum mempool in search of arbitrage opportunities. These opportunities mostly occur on buy and sell orders on decentralized exchanges. An example of an arbitrage opportunity that an arbitrage bot looks for would look something like the following:
- John places a buy order for 1,000 ETH at $2,000/ETH on Exchange A.
- This buy order will cause the price of ETH to rise on Exchange A.
- An arbitrage bot scanning the mempool sees John’s buy order in the mempool.
- The bot places the same trade with 1 Gwei more gas than John.
- The 1 Gwei increase is done to ensure that the bot’s transaction is done first because miners will sort transactions by those paying the most gas fees.
- The bot’s trade causes the price of Ethereum on Exchange A to increase.
- Optional: The bot places a sell order (again, 1 Gwei more than John’s buy order) at the new price in order to sell to John.
- John pays 50% more for his ETH and only receives 500 ETH.
- The bot earns a profit by locking in a sale immediately after purchase by frontrunning the trade, if they want.
That is just one example of how an arbitrage bot can interfere with the organic flow of trading on the Ethereum blockchain. There are obviously more examples than just that, though.
Further complicating matters is that a lot of arbitrage bots are scanning the mempool for the exact same opportunities at any given moment, which results in bots bidding up the gas fees and clogging the blockchain.
So, who wins from the arbitrage bots?
Well, the arbitrage bots sometimes win, but what happens a lot is that the bots keep bidding up the gas fees until there is no more profit. This means that the bots do not really win with a lot of these arbitrage opportunities.
The real winner in all of this are Ethereum miners because they profit from the higher gas fees. In fact, Ethereum miners have even come up with their own method to realize gains from the arbitrage bots, which brings us to our next point about miner extractable value (MEV).
Miner Extractable Value (MEV)
Flashbots has introduced the idea of Miner Extractable Value (MEV) to Ethereum miners. Basically, miners will take the arbitrage profit instead of arbitrage bots. Here’s an example of how that would work:
- John places a buy order for 10,000 Ethereum at $2,000/ETH.
- The miner sees the order in the mempool and knows the price of Ethereum will rise.
- The miner places an ETH order before John’s buy order.
- The miner sells ETH after John’s buy order OR to John.
That is a general guide on how it would work, but it does not really cover everything because it is not that simple to make money by front running trades as a miner.
Plus, miners have a lot of other things to worry about.
And this is where we come back to Flashbots.
Flashbots and MEV
The basic concept of Flashbots is that rather than frontrunning/arbitrage bots scanning the mempool for opportunities, we have Flashbots scanning the mempool for MEV opportunities.
These Flashbots will then pool together profitable blockchain trades for miners to choose. The mining pools can then choose the most profitable trades, specifically the order of the trades, to order in the blockchain.
Why Do Flashbots Work?
Flashbots work because most Ethereum trading relies on the order of the blockchain. As we pointed out in a few of our examples, the order of transactions on the blockchain can have a big impact on the price.
This is more noticeable when there are large buy or sell orders on the blockchain.
In fact, miners actually control a large amount of trading strategies on the blockchain because miners are the parties that determine the order of blockchain transactions.
Benefits of Flashbots
There are a few benefits of Flashbots compared to the traditional method of letting frontrunning bots run rampant across the blockchain.
Lowers Transaction Fees
The most obvious benefit of Flashbots is that transaction fees on Ethereum will lower quite drastically. The reason for this is pretty obvious – there are no bots bidding up transaction fees on the blockchain.
This is because Flashbot does a good job of frontrunning the arbitrage bots and giving that arbitrage opportunity to the only party that can stop arbitrage bots – Ethereum miners.
Lowers Network Congestion
Frontrunning bots don’t only increase the cost of Ethereum transactions. They also decrease the amount of transactions on the Ethereum blockchain.
Remember, Ethereum can only process ~15 transactions per second. And this can become a problem when the blockchain fills up with a lot of bots making transactions that are essentially pointless.
However, Flashbots will not solve network congestion on Ethereum. To solve network congestion, Ethereum must move to Ethereum 2.0 or some other layer 2 solution. Flashbots are simply a temporary fix to a fundamental problem in Ethereum.
Gives Miners Some More Value
Finally, Flashbots will provide miners with the opportunity to earn a little extra money from transactions.
This might not sound like a huge concern at the moment, but remember that EIP-1559 is coming soon and miners will lose a lot of money in block rewards because of it.
Flashbots is the perfect opportunity for miners to earn some extra money and the timing is nearly perfect with the release of EIP-1559 on August 4th.
Are Flashbots Unethical?
There has been some concern that Flashbots are unethical because they allow miners to earn money by not adding value and simply rearranging the order in which they add transactions to the blockchain.
This is obviously true. Miners reorganizing the order of transactions does not add any value and as such there should not be much reward for doing it. However, this implies that Ethereum is a perfectly efficient marketplace, which it is most certainly not.
In reality, front-running bots have been running rampant for the past few years and doing their own reorganizing of blockchain transactions by adjusting their gas fees by 1 Gwei. This has led to a lot of congestion and bloated transaction fees on Ethereum.
Ethereum developers likely view Flashbots as a sort of necessary evil to the blockchain. The thought process of developers likely looks something like:
“There will be frontrunners either way, so we may as well let them easily frontrun trades to reduce bloat and congestion.”
Is It Possible To Avoid Frontrunning on DeFi?
Yes, it is actually possible to avoid frontrunning on DeFi. The best (only?) route for this is to simply trade on decentralized exchanges that encrypts trading data so miners and bots that scan the mempol can’t frontrun it.
A few decentralized exchanges that do this are SecretSwap and Sienna. These exchanges are not very popular at the moment, but what will likely happen is the popular exchanges will begin encrypting trades as MEV and Flashbots become a bigger annoyance to traders.
Will MEV Exist In Ethereum 2.0?
Yes, MEV will still exist in Ethereum 2.0, so Flashbots will still be necessary with the release of Ethereum 2.0.
In fact, MEV will be even more important in Ethereum 2.0 because not all validators will receive block proposals. Some validators will propose more blocks per year while others will propose more blocks per year – it all comes down to luck.
This problem goes beyond the scope of this article, but MEV and frontrunning will still be an issue with Ethereum 2.0.
That covers it for what Flashbots can do for Ethereum. They will lower transaction fees, reduce congestion, and prevent front running bots from wreaking havoc on the Ethereum blockchain.
Is Flashbots a perfect solution?
No, it simply moves the front-running from bots to miners. The benefit of Flashbots is the reduction of congestion on the blockchain.