Hi. Maybe I misunderstand something but it looks like currently updateReserves is only effectively executed once on startup.
await UniswappyV2EthPair.updateReserves(provider, markets.allMarketPairs); is run on each block but looks like updated markets.allMarketPairs are not used afterwards. This PR fixes passing marketsByToken to evaluateMarkets so that their reserves are updated.
Hi. Maybe I misunderstand something but it looks like currently
updateReserves
is only effectively executed once on startup.await UniswappyV2EthPair.updateReserves(provider, markets.allMarketPairs);
is run on each block but looks like updatedmarkets.allMarketPairs
are not used afterwards. This PR fixes passingmarketsByToken
toevaluateMarkets
so that their reserves are updated.