alchemistcoin / sandwiched-backend

GNU General Public License v3.0
25 stars 7 forks source link

Heuristic for multi-layer sandwiches #60

Closed henridf closed 3 years ago

henridf commented 3 years ago

Consider this sandwich:

image

It doesn't make much sense: the profit is greater than the amount traded by the victim!

The reason is that the open/close wrapped multiple user trades on that token. So the total profit of 3.5ETH is spread across multiple swaps.

We can address this in two steps in order of increasing work: