jklepatch / eattheblocks

Source code for Eat The Blocks, a screencast for Ethereum Dapp Developers

Home Page:https://eattheblocks.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Transaction has been reverted by the EVM - 298-arbitrage-uniswap-sushiswap

ChristianErdtmann opened this issue · comments

Hey at first thanks for this amount of code you sharing.

I trying to use the 298-arbitrage-uniswap-sushiswap
And i have deployed it successfull in kovan testnet.

But if i try to trigger the arbitage function i get alltimes the error:
Error: Transaction has been reverted by the EVM

Can you help with this?

Some Info:
I changed added the SafeMath.sol to the files because it was not possible to compile the contract how you have coded it because of the pragma solidity version of SafeMath. Because of this i added it and changed the pragma solidity version for all files to >=0.6.0;
I dont know if this can cause the error.
The rest of the contract is all the same and is not working.
I tried it by trigger via js and i tried to do the function from the remix IDE after deploy.

But in both cases this error.
Here is the failed Transaktion:
https://kovan.etherscan.io/tx/0x3588f6a436c887637c35a816aabd40fee92c9b3c59e87291cc2d1aca4ed46bfa

@ChristianErdtmann checkout this https://docs.uniswap.org/protocol/concepts/V3-overview/swaps#safety-checks. You may need to check your deadline param as that's what will throw the EXPIRED error in the logs there.