Why Are Gas Fees So Low? Inside ETH’s Secret Bot Wars
In Ethereum’s “dark forest,” one brave dev team has taken on the hard task of slaying the arbitrage bots that have spiked gas prices and extracted $370 million from regular DeFi users.
The War Against High Gas Prices
Gas prices dropped significantly over the weekend, dropping near 30-day lows despite ETH itself hitting an all-time high. The reason for the unexpected drop lies in Ethereum’s pool of pending transactions; the mempool.
Pending ETH transactions sit in the mempool until a miner can include them in a block. The pool is sometimes referred to as “the dark forest,” a reference to a sci-fi novel of the same name in which predators stalk a dangerous forest where being noticed can be fatal.
In the Ethereum ecosystem, these predators are arbitrage bots, autonomous programs whose algorithms are set to find big transactions waiting in the mempool and sandwich them between two of their own transactions.
Gas at 500Gwei right now. LOL
Bots be slaving and slaying in the mempool dark forest. 😂 pic.twitter.com/Lge6Xax1qg— G∆V!N LOW (@MrGavinLow) January 4, 2021
Example: Bob executes a buy order to purchase 1000 ETH from the ETH/DAI pool on Uniswap.
An arbitrage bot will:
- Detect the transaction
- Buy ETH right before Bob’s transaction goes through
- Sell the ETH for a profit after Bob’s transaction
For Bob, it will simply seem as if the price of ETH had a sudden uptick right before his transaction. Arbitrage bots can also profit from inefficiencies in the market, such as different prices for the same asset on different decentralized exchanges.
Arbitrage Bots Drive Up Gas Fees
To ensure that the desired transactions happen in the right order, arbitrage bots set very high gas prices to make sure they will be included first in the block, making the arbitrage possible.
This activity increases the average gwei price of transactions. Arbitrage bots are numerous and often need to compete for the same transactions, and they’re programmed to raise their gas prices to be included first in the next block up until the point where the trade is no longer profitable.
These bot bidding wars are the cause of much of the high-paying traffic on the Ethereum blockchain comes from, and also much of the high gas costs.
Every token has a price.
Every dex creates an arbitrage.
Token count x dex count = arb transactions.Bots now spam the mempool with capabilities to borrow and leverage at increasing scale.
Most of ethereum congestion is not human, its bots trading every tick for profit.
— _Checkmate 🔑⚡🎟🌱checkonchain.com (@_Checkmatey_) March 27, 2021
Apart from the arbitrage bots, the great beneficiaries of this system are miners, as gas essentially functions as a tip to encourage miners to pick up a transaction.
This additional value represents an astonishing $370 million since January 1st, 2020, in what is called MEV: miner extracted value.
Many protocols try to fight this issue, and one, in particular, has played a major role in the recent drop.
Flashbots is a research and development organization actively fighting MEV. The group has devised an ingenious system in which the bidding war of the arbitrage bots happens on a parallel channel.
These arbitrage transactions are bundled in an order that increases their chances of successfully carrying out transactions while preventing bidding wars with other bots. By avoiding these gas wars, MEV drops, and gas prices on the Ethereum network do so as well.
These transaction bundles are then sent to miners in a certain order with a generous tip to make sure the bundle is included as fast as possible. Since the bundle is included because of the tip, the gas price of individual transactions in gwei can stay at 0, making them extremely easy to recognize.
% of blocks with at least one 0-gas-price transaction.
The Flashbots effect is real: https://t.co/tPkXIq2Gf0 pic.twitter.com/hTYXIgt55I
— Alex Svanevik 🧭 (@ASvanevik) April 11, 2021
In the last few days, up to 30% of all transactions on the Ethereum network were made through Flashbots’ system, drastically lowering MEV and gas prices.
While it benefits the wider community, Flashbot’s hurts miners by lowering MEV, adding to their EIP-1599 woes with a new proposal to burn a portion of miner fees now on the table.
However, lower gas prices are certainly welcome news to end-users, leaving miners with little choice but to accept and adapt to the new more gas-efficient system.
Disclaimer: The author held ETH, ROOK, and several other cryptocurrencies at the time of writing.