subway
subway copied to clipboard
frontrun tx always reverts with ERC20: transfer amount exceeds balance
It seems that the contract always tries to send some amount of the non-weth token to the pair despite the contract having a balance of 0. What am I doing wrong?
Do you still have this issue? Can share more details?
Acc to this contract, the contract first takes the token, and then changes it to weth in frontrun, and in backrun it converts weth to token. So better way is to replace the token -> weth in frontSliceTxPayload and weth->token in backsliceTxPayload . Or you can do is to fund your sandwich contract with the token you want to swap with