Overview
The overall goal is to populate all the token price fields in terms of the native asset (e.g., UNI price in terms of ETH, JOE price in terms of AVAX, etc.), while integrating the new functionality into the existing solution and maintaining the performance and efficiency of the system.
- Extend the existing data model to store token prices in terms of the native asset for each block in a new
TokenPrice table.
- Update the
EventProcessorStageExchange_Bundle class to:
- Calculate token prices in terms of the native asset using the bundle table data, with additional calculations for each token done in parallel using multiple worker threads.
- Store the calculated token prices in the new
TokenPrice table.
- Use the Redis cache to efficiently store and retrieve token prices.
- Accept a
token_pairs parameter, allowing the class to track multiple token pairs without the need for separate derived classes.
- Update the
_process() method to handle calculations for multiple token pairs.
- Modify the main processing loop to include instances of the updated
EventProcessorStageExchange_Bundle class with the desired token pairs to track.
ref code: https://github.com/blocknetdx/XQuery/blob/master/xquery/event/processor_exchange_bundle.py
Tasks:
#4
#5
#6
#7
Overview
The overall goal is to populate all the token price fields in terms of the native asset (e.g., UNI price in terms of ETH, JOE price in terms of AVAX, etc.), while integrating the new functionality into the existing solution and maintaining the performance and efficiency of the system.
TokenPricetable.EventProcessorStageExchange_Bundleclass to:TokenPricetable.token_pairsparameter, allowing the class to track multiple token pairs without the need for separate derived classes._process()method to handle calculations for multiple token pairs.EventProcessorStageExchange_Bundleclass with the desired token pairs to track.ref code: https://github.com/blocknetdx/XQuery/blob/master/xquery/event/processor_exchange_bundle.py
Tasks:
#4
#5
#6
#7