For optimizing the arbirage we can integrate the algorithm below for finding the best and shortest directions to profit: https://github.com/NaturalNode/natural#shortestpathtree
For optimizing the arbirage we can integrate the algorithm below for finding the best and shortest directions to profit:
https://github.com/NaturalNode/natural#shortestpathtree