yearn / iearn-finance

Web repository
https://v1.yearn.finance
MIT License
257 stars 294 forks source link

Use more precise values for dashboard portfolio balance calculation #221

Open AidanGG opened 3 years ago

AidanGG commented 3 years ago

The currently used values from the CoinGecko API do not have enough precision. For e.g. the 3pool (https://www.coingecko.com/en/coins/lp-3pool-curve), the value used in the dashboard is the $1.01 at the top of the page which is returned by the API, but the actual virtual price is the $1.0056330001021672 shown at the bottom of the page. This difference in precision is not entirely negligible.

antonnell commented 3 years ago

I agree, CoinGecko should probably increase the precision that they return, Do you have a more reliable source for the USD price of assets?

AidanGG commented 3 years ago

https://www.curve.fi/3pool/ has it under "Virtual Price" at the full precision when hovered over.