Open bryan27118 opened 3 years ago
I'm getting the same error. It seems that the ZRX trade is always getting 0 tokens back for some reason...
https://extropy-io.medium.com/arbitrage-bot-part-2-97e7b710dcf
The article explains it best. Essentially you are getting front-rjn, or at least that's the common opinion, I havent dug deep enough but it seems like the result from 0x is 0 because somebody front run you and hence 1inch complains that zero amount makes no sense (selling)
Ah ok. That makes sense then. Thanks!
@ezynda3 any updates on that? Have you tried testing with a forked version of Mainnet? That might prove or disprove whether it was front-runners after all.
@codemedici I'm getting the same error. It seems that the ZRX trade is always getting 0 even with very high gas, did you found any issue on contract?
@Bcantz27 does this bot work?
@nfujimori-godaddy @Welsh-Boogie Tbh I also go the same error when I was running the bot and it's been a year since, I never figured out the issue, haven't tried figuring it out either. I thought it was front runners that caused you to try and trade a 0 amount with OneInch (see the error message generated by the OneSplit contract ), but I'm not so sure actually...
So the question remains, has anyone been able to successfully run this bot?
Transaction keeps reverting with the error "Fail with error 'OneSplit: swap makes no sense'"
https://etherscan.io/tx/0x35c7e07964a90184d8f3571ae4b5d6b976b978b55f306cd21dcfeca39e5eff49
It seems the error is being thrown from OneSplit's swap function
More specifically, this line here
require(fromToken != toToken && amount > 0, "OneSplit: swap makes no sense");
My guess is that the amount being passed is less than zero in the TradingBot contract. https://github.com/ExtropyIO/defi-bot/blob/f77ea1cf0f9317496275ca97a5f0da66ab301e8b/src/contracts/TradingBot.sol#L290-L293
Does anyone have any ideas what might be happening or how to work around this?