At the moment, prices are updated only after finishing syncing from archive so old price info is lost and processing of swap events does not have access to the price of our native token.
Requirement
Update prices every CATCHUP_PRICE_UPDATE_PERIOD blocks when syncing from archive so that we maintain a fairly accurate price history, where CATCHUP_PRICE_UPDATE_PERIOD is an environment variable that defines how often (in blocks) the price info should be updated.
Context
At the moment, prices are updated only after finishing syncing from archive so old price info is lost and processing of swap events does not have access to the price of our native token.
Requirement
Update prices every
CATCHUP_PRICE_UPDATE_PERIOD
blocks when syncing from archive so that we maintain a fairly accurate price history, whereCATCHUP_PRICE_UPDATE_PERIOD
is an environment variable that defines how often (in blocks) the price info should be updated.