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

All instructions followed, yet bot still doesn't seem to work. #14

Closed jamil-wittmann closed 1 year ago

jamil-wittmann commented 1 year ago

I was able to deploy and interact with sandwich contract successfully and after running the bot I'm getting both of the appropriate sim failed errors as seen in the demo video:

sim failed due to FrontrunReverted(b"\x08\0\0" sim failed due to FrontrunReverted(b"\x9f\0\0"

The behaviors are expected and everything looks good so far. However, the bot still doesn't seem to be working correctly. One unexpected behavior is this,

thread 'tokio-runtime-worker' panicked at 'calledResult::unwrap()on anErrvalue: FrontrunEvmError(Transaction(NonceTooLow { tx: 1, state: 6 }))', src/simulate/make_sandwich.rs:439:10

I feel like this is currently the barrier preventing the bot from working correctly.

The error NonceTooLow suggests that the nonce used in the transaction (tx: 1) is lower than the current nonce in the state (state: 6), hence the transaction is considered invalid. But I don't really know where to begin with fixing this.

Any help or insights would by very much appreciated.

please note the line 439:10 doesn't match the exact place in the repo's code as I've added print statement in my code.

SadeRespector commented 1 year ago

I believe this is simply caused by the TX the bot is attempting to sandwich is now already confirmed

DaveBennet commented 1 year ago

Never mind, I actually ran the bot and get this error as well, it looks like the nonces that are referenced are the searcher wallet address and the victim wallet address. Also not sure what is going on here.

asmitb127 commented 1 year ago

Hi, Guys any update on the issue? Were you guys able to run it after some updates?