feat: add support for curve in pricing module. #501
Labels
C-enhancement
New feature or request
D-4
Difficulty 4/5 (hard)
P-2
Priority 2/3 (average criticality)
Describe the feature
Currently we support pricing for Uniswap v2 and v3 variants. However we also want to add support for all of curve.
How we currently do things:
The pricing module depends on
DexPriceUpdates
, When a new dex price update is sent from the classifier to the pricing module, We check to see if we have a pricing graph generated for the given struct. If not, we look at all pools for supported dexes and load the initial state for the given block. This is the first functionality needed for curve. Secondly, Once initialized, the state of this pool is constantly updated byDexPriceUpdates
. These dex price updates are automatically generated from classifiers so no need to worry about building this. Once we have state loaded, we use the state to get prices for a pool that are used in the calculation of a given pair whenever the classifier tells us we might need the price.What needs to be added
Additional context
Please make sure that we support all liquidity events (mint,burn,swap) for each one of these as its crucial for correct pricing.
The text was updated successfully, but these errors were encountered: