mouseless-eth / rusty-sando

Implementation of a competitive v2/v3 multi-meat MEV sandwich bot written using Rust and Huff.
MIT License
767 stars 256 forks source link

[huffsando: REVERT] frontrun #35

Closed e7172 closed 1 year ago

e7172 commented 1 year ago

Ive try to run this code using: cargo run --release --features debug

And always get: [huffsando: REVERT] frontrun

Sometimes with this error also: [ERROR] error receiving event: channel lagged by X

The issue is duplicated because mouseless-eth closed it, I don't understand why.

Any idea?

Thanks,

e7172 commented 1 year ago

Again closing witouth leaving an explanation..

mouseless-eth commented 1 year ago

Again closing witouth leaving an explanation..

Worth double checking that the pk in ur dotenv is correlated to the address in the huff sando contract (if not then all frontruns auto revert because the simulated tx wont pass the auth checks).

If this isnt the case, the issue can be quickly diagnosed by using forge (with cheat codes) to quickly recreate the failed simulated sando (frontrun + victim + backrun) and by inspecting the output call trace / stepping through debugger