flashbots / mev-inspect-py

🔎 an MEV inspector for Ethereum 🔎
MIT License
826 stars 258 forks source link

Non-arbitrage transactions containing multiple swaps cause inspect to fail #323

Closed pintail-xyz closed 1 year ago

pintail-xyz commented 1 year ago

Currently block 16330258 causes inspect to hang. The reason is transaction 0x85e0819ae6e559ed1c1f2dcd6db02ca7bfb3b44b8d4efca9cd40b987abf4706b, in which WETH is swapped back and forth with FX token, presumably in an effort to spoof trading activity.

Because multiple swaps occur in this transaction, including swaps back to the original token, mev-inspect-py incorrectly identifies this as arbitrage. Because no actual arbitrage occurs, the path finding algorithm gets locked in an infinite loop.