Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add support for curve in pricing module. #501

@Will-Smith11

Description

@Will-Smith11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementNew feature or requestD-4Difficulty 4/5 (hard)P-2Priority 2/3 (average criticality)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions