-
Notifications
You must be signed in to change notification settings - Fork 48
Description
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 by DexPriceUpdates. 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
- build pool state initializers for all curve pool variants.
- add support to constantly update state from either pool logs or normalized actions on the pool.
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.