Original source: Robert Miller
Text compilation: beats 0x49
The story of the dark forest is more and more interesting. The hunter is the hunted as well as the hunted.
At first, sandwich arbitrage bots hunted down ordinary users. Sandwich arbitrage robots are then snared, and those who think they are hunters may be the prey.
On April 11, a user swiped more than 100 ETH from a sandwich arbitrage robot. The pillaged robots then sensed a new opportunity and began hunting down their former peers for a profit of 300 ETH.
Cryptocurrency enthusiast Robert Miller summed it all up and documented it, which Rhythmic Blockbeats has compiled as follows:
To understand this process, you need to know a little about Flashbots. Flashbots can be seen as a way for users to communicate their transaction sequencing directly to miners through "bundled transactions." Users who use Flashbots do not pay the gas price but instead pay for a call to a smart contract that allows miners to capture ETH.
As shown in the figure below, this is the arbitrager performing the operation. The arbitrage robot paid the smart contract call fee of 0.075eth to the Spark Mine Pool, and the gas price was 0.

Miners can extract bundled deals (high transfer fees) from transaction users, which include trades that allow for arbitrage space.
Bots also like bundled deals, because they participate in arbitrage and only pay for the transactions involved, and the fees they pay are predictable.
Sandwich arbitrage robots monitor Mempool, which trades in Dex, and perform sandwich arbitrage: buying before the victim buys drives up the price, and selling at a profit when the victim buys. These three trades (TX: robot buy, victim buy, robot sell) make up a bundle of trades. (Note: The robot sale includes a smart contract payment to the miners.)

Three deal

Pay miners for smart contracts
Paying miners for smart contracts is a very important step, which will be key to hunting down arbitrage robots. This step would only be triggered if the robot sold the tokens it had bought and made a profit. If the sale fails (i.e., the third deal fails), no smart contract fee will be paid to the miners, and therefore it will not be packaged as a bundle.
For arbitrage, the robots perform simulated trades locally. If the simulation passes, the machine will begin to arbitrage.
After Nathan Worsley's salmonella article, a group of people started trapping sandwich arbitrage robots.
(Rulatory note: Salmonella is an ERC20 decoy token created by LocalcoinsWAP co-founder Nathan Worsley. Read moreA Hunt in the Ethereum Dark Forest: Arbitrage Robots Suffered Arbitrage of 130ETH,Destroying the Fun and Profits of Sandwich Arbitrage)
In a normal sandwich arbitrage, if no ETH is made, no payment is made. The arbitrage robot also performs simulations to see if it will be caught before the arbitrage is complete.
But there are two clever people who have identified a weakness in arbitrage robots.
The first line of defense for arbitrage robots is to simulate beforehand, which is done using the ERC20 transfer function. This function checks if the block is mined by a Flashbots miner. If it is, reduce the trade. Below is my camouflage code. The local mode looks good, but it can fool the sandwich arbitrage robot.

The second line of defense is the arbitrage robot described above, which makes payments to miners as a condition of judgment. This condition can be circumvented (implemented in code) by using ERC20 tokens to pay miners.

So even if the arbitrage robot fails to sell, the miners will still get paid.


The sandwich arbitrage robot buys 100 ETH salmonella tokens.

The token owner traps the robot and automatically triggers the transfer function, which automatically pays the miner 0.1ETH.

The third stage of the arbitrage robot's trade, the "sell", failed to take place.

Since the three trades of arbitrage robots were submitted in a bundle, the three transactions "arbitrage robot buy", "trap buy" and "sell failed" were all recorded by the block network.
Users in the first experiment have already earned about 100ETH using this method. Details:https://etherscan.io/token/0xe253a1f7d5818022661bfbd2cbe043b642b4eff9?a=0x01f8d5a4862d51d2cf0cf52ac900a4d60adaeee6
One of the Sandwich Arbitrage Bots that was hunted was a brilliant Flashbots operator who started a new round of operations after being hunted.
In a short time, the victim becomes a top predator.
He launched a similar but slightly different ERC20 token, Yolochain, and successfully ensnared more sandwich arbitrage bots. He made a profit of 300 ETH just by capturing the arbitrage robot.
Then, the Salmonella token issuer earning 100 ETH noticed the robot that it killed and backhanded killed its own kind, which he used in Flashbots' DiscordEncrypted Message SignatureWrite a tribute to this robot:
Congratulations 0X2, my sloppiness cost me these opportunities to make money. I respect you. Not many people react the way you do.

Several robots were sucked dry in the event. The profit of the bots killed by the two Salmonella token issuers was around 400 ETH, although there could be many more killed. For now, though, the hunt is over. The arbitrage robot has noticed the incident and updated its program.
Sandwich arbitrage is not always safe, according to the man who runs the robot.
The dark forest is a dangerous place, and as the 11th showed, those who think they are hunters can also be prey.
The original link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia