Sandwich attacks on millions, how dishonest traders make money

Our experts tell us what sandwich attacks are. And how trading bots generate millions of dollars for their creators by tracking profitable transactions on the blockchain

An anonymous trader who owns an Ethereum wallet with the address jaredfromsubway.eth became a star in the cryptocurrency community in one day. This became known thanks to the tactics of the so-called sandwich attacks. It earned more than $4 million in just one day and became the leader in terms of network commissions, displacing the largest cryptoservices.

Such attacks are not a new concept in decentralized finance (DeFi). The sandwich metaphor is used because a trader’s tactics are based on two-way use of information about someone else’s bid to buy a particular cryptoasset. By using special bots, the trader tracks transfers in the pool of unconfirmed Ethereum or other blockchain transactions.

When the bot finds a large order that will inevitably lead to an increase in the price of an asset. It buys the asset in advance at a lower rate, “pushing” its transaction at the expense of an increased commission. And after the order is executed and the price rises, he sells it with a profit. The process is automated and takes place in seconds.

Memes and commissions

The most attractive targets for such attacks are usually low-liquid assets. For example PEPE, a new token named after the famous meme of Pepe the frog, has become just that. PEPE quickly gained popularity when a story broke in the community about How a certain early buyer of the token turned $250 into $1.8 million at a thousand-fold increase in its price.

In search of quick profits, thousands of other traders began buying up PEPE. In parallel, similar tokens named after famous memes – CHAD, WOJAK and others – started to be launched. Due to the low liquidity of the tokens, any large purchase order pushed their prices up. And such bids were hunted by bots of traders making money on sandwich attacks.

According to analytics service EigenPhi, PEPE and WOJAK have become the most popular assets on the Ethereum network over the past week. But after the stablecoins USDC and USDT with transaction volume of more than $250 million and $120 million, respectively. The wallet owner jaredfromsubway.eth had about $1.6 million in revenues from sandwich attacks in pairs with PEPE and more than $2.8 million in transactions with WOJAK.

However, the implementation of this strategy in such volumes requires high costs to pay higher commissions to ” push transactions “. The owner of jaredfromsubway.eth spent about $1.3 million on gas on the Ethereum network in just one day. That’s about 1.8% of the network’s total commissions over the same period. At the moment, only the Arbitrum network contract was ahead of the trader in terms of commissions. Which has an entire ecosystem of applications with millions of users.

Community observers estimate that jaredfromsubway.eth has spent about $7 million in commissions on more than 180,000 transactions over the past two months. When it sought to make a profit ahead of other users’ transactions.

Sandwich attacks are not an ethical tactic

Sandwich attacks are just one tactic within the larger phenomenon of Maximal Extractable Value (MEV). It is a technique that manipulates the sequence of transactions in the blockchain for profit. For example, by arbitrage or by outperforming other people’s transactions. The profits from MEV usually go to the creators of transaction blocks on the Ethereum network. They are the ones who determine the order of these transactions and then pass it on to validators. Ordinary users cannot influence their own transactions. And wallets and applications do not have the necessary tools to use MEVs to their advantage.

It takes the Ethereum blockchain about 12 seconds to validate a single block of transactions. Bots have enough time to scan each of the unvalidated transactions in a block and get ahead of the time to close someone else’s transaction. The process whereby the bot puts its own transaction in front of another’s (which will cause the price of the asset to rise) is called frontrunning. Repositioning a transaction with a bid to sell an asset already at a higher price is called backrunning. The combination of both processes creates a sandwich attack.

Traditionally, these tactics are considered unethical. But it is not prohibited either. The lack of a central supervisory body for DeFi plays into the hands of MEV traders. Most of their transactions take place on decentralized exchanges (e.g., Uniswap). This was the case with the owner of the wallet jaredfromsubway.eth. Similar to how high-frequency trading market players lead in profits on traditional markets. So do crypto traders in the MEV segment, using a variety of tactics to generate billions of dollars in crypto-assets revenue.

How to combat this

Our experts point out that Flashbots has been fighting for a fair market in the MEV field for years, creating software and infrastructure to reduce manipulation in this area. On April 20, the developers presented a beta version of their MEV-Share protocol. The purpose of which is to distribute a portion of the profits from maximum recoverable value to Ethereum users. According to the developers, it will give users the ability to control their transactions.

 

Read More