2

I am currently watching into vulnerabilities and different threats for DEXes. I found some sandwich attacks or front running, that use moderate-high Gas Fees on Buy and crazy high Gas fees on the sell. Why is this so?

I mean almost the whole drain was used on fees. Furthermore why are is does the buy of the "victim" have lover fee than the actual attack?

Can someone explain that to me?

Here is an example: Contract Name: Feudalz Goldz $GOLDZ Contract Adress: 0x7be647634a942e73f8492d15ae492d867ce5245c

Buy Front Run: Buys 2.71431 $ETH to $GOLDZ GAS: 29 https://etherscan.io/tx/0x89fe9891aa8e6361914b270b0a77353ea4d7384b33e657f0afc7d0204a9eac92

Victim Buy: Buys 1 $ETH to $GOLDZ GAS: 31 https://etherscan.io/tx/0x36fb94763cbd415ed3b05def8b6488c014b255b5a106d10f80d1befe72864ec3

Sell Front Run: Sells 2.86919 worth $GOLDZ to $ETH GAS: 1,612 equvalent of 0.1516 ETH https://etherscan.io/tx/0xcceb888f77b56b72f15a6e1a720cb0d99a88e2aa7e2486b9fe47c85e7f079a4f

As I see it they drained 0.1548 and paid 0.1516 for fees what makes them earn only 0.0032. Is this correct?

1
  • I posted a similar question. My question is Flashbots specific, but I noticed a similar pattern of ascending gas prices for the sandwich, which is counterintuitive.
    – j2abro
    Apr 20, 2022 at 23:43

2 Answers 2

0

The whole point of the sandwich attack is to sandwich the attacker by inserting two transactions, one before and one after.

To get in front of the attacker transaction, you need to pay more gas fees than the attacker. Once the attacker transaction is mined, you need to place sell order to make a profit.

The sandwich bots are built to make a profit. As long as there is profit, they will perform the attack.

2
  • Ok, but isn't it wasted on the sell? I mean if I would program that, I would put more on the Buy rather then the sell or am I missing something?
    – Stevie
    Apr 7, 2022 at 15:35
  • I see; I am not sure why they paid this much gas fees.
    – Emrah
    Apr 7, 2022 at 15:54
0

I found the solution in the following paper, if someone is interested here is the paper: https://pub.tik.ee.ethz.ch/students/2021-FS/BA-2021-07.pdf

Basically, there are a lot of bots trying to win the "Flashbots Auction". In the beginning, there weren't as many bots that tried to do this so there was much more profit to be made. Nowadays the profit is spent to bribe the Miners to take their transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.