yearn / yearn-api-archived

Collection of serverless API
23 stars 24 forks source link

Add ySUSD pool to holdings endpoint and restructure poolBalanceUSD, restructure TVL to expose earnHoldings, vaultHoldings, StrategyHoldings. Include mUSD and SUSD vaults #47

Open miguel567 opened 3 years ago

miguel567 commented 3 years ago

ySUSD earn pool: https://etherscan.io/address/0xF61718057901F84C4eEC4339EF8f0D86D2B45600

earnHoldings:

update TVL endpoint so it adds up correctly earnHolding pieces.

expose the earnHoldings, vaultHoldings and strategyHoldings keys in the TVL endpoint

include mUSD and ySUSD vaults

update type in calculation key.

miguel567 commented 3 years ago

Going to add a type key in the holdings endpoint to differentiate the products. type: 'earn' is the earn product. type: 'vault' is V1 and V2(when they are added) vaults.

with these then I can iterate over all type === 'earn' and get the earnHoldings total easily.