White-Whale-Defi-Platform / white-whale-bots

A single-chain and multi-dex arbitrage bot the utilizing White Whale flash loans and Skip Protocol.
https://whitewhale.money
MIT License
81 stars 32 forks source link

Bug: UnCdPaths adds orderbookpath index to paths. refactor this. #107

Closed SirTLB closed 1 year ago

SirTLB commented 1 year ago

Currently when an orderbook path is traded it gets added to the cdPaths array to cooldown. After this period, it should be removed from the cdPaths array and added again to the orderbookPaths array to calculate arbitrage from again. However, this system is not built correctly and results in an undefined value being added to the paths array and therefore the crash of the bot.