Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
Will-Smith11 opened this issue Mar 7, 2024 · 0 comments
Open
2 tasks

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

Will-Smith11 opened this issue Mar 7, 2024 · 0 comments
Labels
C-enhancement New feature or request D-4 Difficulty 4/5 (hard) P-2 Priority 2/3 (average criticality)

Comments

@Will-Smith11
Copy link
Collaborator

Will-Smith11 commented Mar 7, 2024

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.

@Will-Smith11 Will-Smith11 added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Mar 7, 2024
@0xvanbeethoven 0xvanbeethoven added D-4 Difficulty 4/5 (hard) P-2 Priority 2/3 (average criticality) and removed S-needs-triage This issue needs to be labelled labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request D-4 Difficulty 4/5 (hard) P-2 Priority 2/3 (average criticality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants