yuichiroaoki / poly-flashloan-bot

Flashloan Bot on Polygon
https://yuichiroaoki.medium.com/flashloan-bot-on-polygon-part-2-3eae0ac33986?sk=80821da4ca1d0462c7c9ae617df56bdd
MIT License
302 stars 192 forks source link

SetInterval #104

Open dani-s-92 opened 1 year ago

dani-s-92 commented 1 year ago

Hello, in your index.js you are using setInterval() to rerun your code again. If I try this, everyone I rerun the code to fetch prices (every 1 second) it needs a bit longer to check prices. What can I do, to not let the runtime increase with time?