Normally when you swap on Uniswap the transaction is publicly relayed through nodes until it reaches miners. Due to this anyone who wants to can see the transaction before it is mined.
Bots watch for these transactions before they are mined and try to extract money from them.
This is how "sandwich bots" find their victims.
Here's what a sandwiched transaction looks like:
🥪 gets ahead of it, buying up a token to raise the price for the victim
Victim executes their swap, now getting less tokens but raising the price more
🥪 sells their tokens at the elevated price, pocketing a profit
Alternatively in some cases it makes sense for bots to land right behind a pending transaction and arbitrage away any profit made from potential distortions.
Ethermine's backrunning bot landed an impressive 3 arbs this way, including behind Vitalik's tx
Vitalik had 4 transactions fail at an eye watering ~1000 gwei gas price and was probably mindful of the aforementioned sandwich bots that could making be making his transactions fail.
So what did he do about it?
Recall that bots watch for pending transactions while they are in flight to miners. In order to sandwich a trade it needs to be made public.
So what if transactions were sent directly to miners instead of through full nodes where anyone could see them?
That is the basic premise behind new products like Flashbots, Taichi, MistX, or ArcherSwap: provide a direct line to miners so users can't be frontrun.
Vitalik used ArcherSwap to sell some of his Shibu earlier, and his transaction then succeeded where they had previously failed.
Read more about ArcherSwap in @calebsheridan's tweets below
ArcherSwap is built using a fork of MEV-Geth and MEV-Relay - two codebases from Flashbots Research.
ArcherSwap routes trades to miners on the Archer Network, which in this case was mined 2miners. etherscan.io/block/12421138
At Flashbots we're super excited by innovation like this that provides better experiences (e.g. frontrunning protection and creative use cases) and outcomes (better prices) for users.
In January Flashbots released Flashbots Alpha v0.1, a proof of concept communication channel between miners and users that enables transparent and efficient MEV extraction.
Since then we've seen rapid adoption, and now over 30% of blocks on Ethereum are Flashblocks.
Flashbots has two types of direct users today: searchers & miners
Searchers are users who send transactions via Flashbots - today these are mostly bot operators extracting MEV
Miners are the block producers of Ethereum today, who want to extract MEV in a fair & transparent way
Our investigation starts with this massive - but otherwise innocuous - Flashbots transaction that has 0 gas price and a payment of 80 ETH to a miner. Makes sense.
It looked at first like someone sniping a new token on Uniswap.
Last night someone used an *extremely* clever mechanism to take a hundred ETH from sandwich bots
Then a 2nd person jumped in and made 300 MORE ETH by exploiting other sandwich bots
Long thread on how 👇🏻
To understand how this happened you need to know a bit about Flashbots
You can think of Flashbots as a way for users to directly communicate their transaction ordering preferences to to miners via "bundles" of transactions
Instead of users paying transaction fees via gas prices, using Flashbots users pay fees via a smart contract call (block.coinbase.transfer) which transfers ETH to a miner
Here's a screenshot of a random arb that does this, note the 0 gas price & 0.075 ETH transfer to Spark Pool
So this one is interesting! A bot has been backrunning new token listings, effectively paying premium to miners to buy newly listed tokens before anyone else can
And a new token fought back yesterday, trapping the bot for $200k while benefiting from their buy. Here's how 👇🏻
For weeks this bot has been monitoring the Ethereum mempool for new pairs being created on Uniswap. If it finds one it the bot places a buy transaction immediately behind the initial liquidity. That way they can buy a new token before anyone else.
They've been paying miners huge amounts for the right to do this! You can see here a few of the top Flashbots bundles of all time are from this bot. In total they've paid 340 ETH to miners.
Side note: this is from a dashboard Flashbots is making public soon.