yearn / yearn-vaults-v2-subgraph

26 stars 41 forks source link

feat: add price per token to vault day data [WEB-338] #85

Closed jstashh closed 3 years ago

jstashh commented 3 years ago

This will let us calculate the user earnings from the sdk without having to query historical data from the oracle, since we can derive it from tokenPriceUSDC on the VaultDayData entity.

Also it'll speed up deployment because instead of reading from the oracle twice in VaultDayData, we only do it once now.

Fixes https://github.com/yearn/yearn-vaults-v2-subgraph/issues/84

linear[bot] commented 3 years ago
WEB-338 Add historical vault token price in usdc to VaultDayData entity

This will let us calculate historic user earnings in the sdk without needing to query the oracle