Research Summary: Analyzing and Preventing Sandwich Attacks in Ethereum

During the just concluded synthesis cohort, I wrote about the ethics and impact of sandwich attacks. Today, I will add a practical way to prevent sandwich attacks on Ethereum. This is based on my recent research effort after my interaction with @Humphery on the issue of resolving sandwich attacks.

The primary cause of a sandwich attack in Ethereum is front-running. Front-running involves a clever user trying to process their transaction before yours, although you initiated yours before theirs. In doing this, they get a better price than you and you incur some loss.

The above manipulation is possible because the user can see your transaction in the public Mempool. This is a bit of a mouthful. Let’s see what a Mempool means.

But suppose you find a way to bypass the Mempool and go directly to the miners/validators? If you do this, no one on the network will see your transaction except the miners/validators.

If no one can see your transaction awaiting addition to a block, no one can front-run it.

Escaping the probability of front-running means escaping sandwich attacks.

The above concept is referred to as a Private Transaction. So in a private transaction, when you broadcast your transaction to the Ethereum network, instead of sending to the Mempool, you send directly to the validators/miners.

This research paper by @MiaZmy studies private transactions in Ethereum and its limitations.

6 Likes