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

JUMPDEST locations are incorrect. #37

Closed SadeRespector closed 1 year ago

SadeRespector commented 1 year ago

The read me in contract folder incorrectly lables the jump destinations, if you need the jumpdest use the following table pulled from the contract

├─ [2352] SandoCommon::getJumpDestFromSig(v2_backrun0) [delegatecall]
│   └─ ← 5
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000005) [staticcall]
│   └─ ← ()
├─ [3148] SandoCommon::getJumpDestFromSig(v2_frontrun0) [delegatecall]
│   └─ ← 10
├─ [0] console::f5b1bba9(000000000000000000000000000000000000000000000000000000000000000a) [staticcall]
│   └─ ← ()
├─ [3943] SandoCommon::getJumpDestFromSig(v2_backrun1) [delegatecall]
│   └─ ← 15
├─ [0] console::f5b1bba9(000000000000000000000000000000000000000000000000000000000000000f) [staticcall]
│   └─ ← ()
├─ [4736] SandoCommon::getJumpDestFromSig(v2_frontrun1) [delegatecall]
│   └─ ← 20
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000014) [staticcall]
│   └─ ← ()
├─ [5531] SandoCommon::getJumpDestFromSig(v3_backrun0) [delegatecall]
│   └─ ← 25
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000019) [staticcall]
│   └─ ← ()
├─ [6327] SandoCommon::getJumpDestFromSig(v3_frontrun0) [delegatecall]
│   └─ ← 30
├─ [0] console::f5b1bba9(000000000000000000000000000000000000000000000000000000000000001e) [staticcall]
│   └─ ← ()
├─ [7119] SandoCommon::getJumpDestFromSig(v3_backrun1) [delegatecall]
│   └─ ← 35
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000023) [staticcall]
│   └─ ← ()
├─ [7915] SandoCommon::getJumpDestFromSig(v3_frontrun1) [delegatecall]
│   └─ ← 40
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000028) [staticcall]
│   └─ ← ()
├─ [8708] SandoCommon::getJumpDestFromSig(seppuku) [delegatecall]
│   └─ ← 45
├─ [0] console::f5b1bba9(000000000000000000000000000000000000000000000000000000000000002d) [staticcall]
│   └─ ← ()
├─ [9503] SandoCommon::getJumpDestFromSig(recoverEth) [delegatecall]
│   └─ ← 50
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000032) [staticcall]
│   └─ ← ()
├─ [10299] SandoCommon::getJumpDestFromSig(recoverWeth) [delegatecall]
│   └─ ← 55
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000037) [staticcall]
│   └─ ← ()
├─ [9503] SandoCommon::getJumpDestFromSig(recoverEth) [delegatecall]
│   └─ ← 50
├─ [172] 0xf92CE891Ab58B70486487043DD3f2e6eD713e019::fallback() 
│   ├─ [0] 0xFA66075755e579b37B654d3baAF7da0F70cd09bE::fallback() 
│   │   └─ ← ()
│   └─ ← ()
├─ [9503] SandoCommon::getJumpDestFromSig(recoverEth) [delegatecall]
│   └─ ← 50
├─ [0] console::f5b1bba9(0000000000000000000000000000000000000000000000000000000000000032) [staticcall]
│   └─ ← ()
└─ ← ()
Cionn3 commented 1 year ago

Did you use foundry to get the jumb labels? Im also trying to find out using foundry using the forge test --debug TESTFUNCTION but no luck

mouseless-eth commented 1 year ago

Thank you, good catch. Will fix the docs