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
83 stars 32 forks source link

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

Closed SirTLB closed 11 months ago

SirTLB commented 11 months 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.