gweidart/evm-flashswap-arb

Execution reverted

devgrd opened this issue · 4 comments

Transactions are being sent but they are always reverted. What could be issue? Only changes I made is downgrading minimumProfit to see new arbitrage chances and uncommenting some other base and quote tokens. Transaction error I see on transaction hash is: "Error: (Awaiting internal transactions for reason)"

Transactions are being sent but they are always reverted. What could be issue? Only changes I made is downgrading minimumProfit to see new arbitrage chances and uncommenting some other base and quote tokens. Transaction error I see on transaction hash is: "Error: (Awaiting internal transactions for reason)"

Most of the time if the execution reverts its because the complete arbitrage txn could not be completed within 1 block. The next block was mined before all the different steps of the arb were able to complete.

What chain are you on?

Some tokens are not compatible with the bot. Mainly those with a transaction “tax”, less than 18 decimals, etc…

I'm on KCC. I checked the raw traces on explorer, so I guess the issue is uncompleted txn, because generally execution is reverting at the last 2 calls of txn. Do you have any solution without building own node? I think the bot is not working efficiently with public rpc. I sent about 150 different arb transaction and all of them are reverted on the chain. Also, I worked on 18 decimals tokens especially, so I think this is not the issue. And is there a function in the contract to make arb with contract's own tokens? I deeply digging and working on your code but I couldn't figure this out. I mean execution without loan.. Since as I see the reason of reverting is that loan need to payback in the same block. Right?

I'm on KCC. I checked the raw traces on explorer, so I guess the issue is uncompleted txn, because generally execution is reverting at the last 2 calls of txn. Do you have any solution without building own node? I think the bot is not working efficiently with public rpc. I sent about 150 different arb transaction and all of them are reverted on the chain. Also, I worked on 18 decimals tokens especially, so I think this is not the issue. And is there a function in the contract to make arb with contract's own tokens? I deeply digging and working on your code but I couldn't figure this out. I mean execution without loan.. Since as I see the reason of reverting is that loan need to payback in the same block. Right?

1). Using a public RPC simply isn’t going to work. They are not fast enough to be competitive. Not to mention you will more than likely be rate limited the majority of the time.

2). You should load up the contract and add the different tokens you want to use as a “Base” with the function ‘addBaseToken’.
you can use my tool https://kcc95.netlify.app to do this easily.

3). In regards to having the contract use your own tokens… I’m sure that could be achieved. However it would no longer be a flash swap arbitrage. If that’s the case it would likely be more efficient to use an off chain arb bot implementation as you would no longer need to use flashswaps.

Due to the lack of response I have to assume this issue is resolved.

Closed.