balancednetwork / balanced-backend

Backend to balanced stats page and other services
Apache License 2.0
0 stars 1 forks source link

Add total stability fund time series #34

Closed hetfly closed 8 months ago

hetfly commented 8 months ago

https://balanced.icon.community/api/v1/docs#/default/contract_methods_api_v1_contract_methods_get

we need a way to fetch total stability fund balance, sum of all tokens at the current time of the contract, keep the same data structure as below, please

there are now calls for each individual approved stable coin in the stability fund contract_name=stability_BUSD_balance contract_name=stability_IUSDC_balance ...

we don't need those anymore

robcxyz commented 8 months ago

Shouldn't these be normalized to USD or something? Seems like combining balances of different tokens makes no sense.

hetfly commented 8 months ago

All of them are stable coins, so it shouldn't matter. But I realised now that some of those will be yield baring, so the price can be 1.05 for example. So normalizing might be better to do so actually.

robcxyz commented 8 months ago

@hetfly - https://balanced.icon.community/api/v1/docs#/default/contract_methods_api_v1_historical_stability_get

Let me know if this needs to be reopened