alchemistcoin / sandwiched-backend

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

Detect sandwiches with a cross-pool arb #7

Open henridf opened 3 years ago

henridf commented 3 years ago

We should detect pool arbitrations that happen between an open sandwich and the target. For example:

Here's a sandwiched ETH->FARM swap: https://etherscan.io/tx/0xd82a86f8324fba7e0d374b461d6faf0c39a0d53fde06505d6c2cb8447609c617

And here's the open-sandwich, in the same block: https://etherscan.io/tx/0x699de2603b40fea219afeccf388ea6c66b36758d89ab1eebb3324239ee442378

And here's the cross-pool arbitrage: Buy some FARM on Sushi and resell it on Uniswap, taking advantage of the open sandwich having bumped the price on uniswap. https://etherscan.io/tx/0x5388fac80cbc6840319d783d94c47c0586a119a8c8f54c48cf9b7a88f284751b