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 ICurveStableSwapNG #933

Merged
merged 5 commits into from
Apr 24, 2024
Merged

Conversation

rndquu
Copy link
Member

@rndquu rndquu commented Apr 22, 2024

Resolves #931

This PR refactors LibUbiquityPool to use ICurveStableSwapNG instead of ICurveStableSwapMetaNG.

ICurveStableSwapMetaNG is basically a Dollar/3CRV pool. Keeping in mind that 3CRV is equal to $1.03 we can't reliably fetch Dollar price in USD from ICurveStableSwapMetaNG.

We plan to create a new ICurveStableSwapNG pool with LUSD/Dollar pair. So calculating Dollar price in USD works this way:

  1. Fetch LUSD/USD price from chainlink
  2. Fetch Dollar/LUSD price from Curve's ICurveStableSwapNG oracle
  3. Now we have everything to calculate Dollar/USD price

P.S. Deployment scripts will be updated in a separate PR

@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Apr 22, 2024

@rndquu rndquu marked this pull request as ready for review April 24, 2024 07:49
@gitcoindev
Copy link
Contributor

Implementation-wise looks perfect, I will wait for the security research with his review before approval to merge.

@0xadrii
Copy link

0xadrii commented Apr 24, 2024

Everything looks correct, the issue is properly fixed

Copy link
Member

@molecula451 molecula451 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, great work as usual, rndquu

@molecula451 molecula451 merged commit 8aaa03c into ubiquity:development Apr 24, 2024
15 checks passed
@rndquu rndquu deleted the feat/931 branch April 24, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants