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 ICurveStableSwapNGoracle
3) Now we have everything to calculate Dollar/USD price
P.S. Deployment scripts will be updated in a separate PR
Resolves https://github.com/ubiquity/ubiquity-dollar/issues/931
This PR refactors LibUbiquityPool to use ICurveStableSwapNG instead of ICurveStableSwapMetaNG.
ICurveStableSwapMetaNG
is basically aDollar/3CRV
pool. Keeping in mind that3CRV
is equal to$1.03
we can't reliably fetch Dollar price in USD fromICurveStableSwapMetaNG
.We plan to create a new
ICurveStableSwapNG
pool withLUSD/Dollar
pair. So calculating Dollar price in USD works this way: 1) FetchLUSD/USD
price from chainlink 2) FetchDollar/LUSD
price from Curve'sICurveStableSwapNG
oracle 3) Now we have everything to calculateDollar/USD
priceP.S. Deployment scripts will be updated in a separate PR