Total ICP value locked in NNS dashboard is pretty smart but how is it calculated and how often does it refresh?
We are using a new TVL canister (DFINITY Canister Candid UI) so, basically the app just calls the
To calculate it, it needs:
governance_not_dissolving_neurons_e8s_countfrom the Governance canister metrics
the ICP <> $ ratio
const totalNeurons = totalDissolvingNeurons + totalNotDissolvingNeurons; const display = (totalNeurons / 100_000_000) * tokenRatio;
We used to call third party API - for a short time until the canister was ready - to fetch these information. You can checkout this PR #1953 for more information.
Regarding “how often”, if I get it right currently the governance metrics are updated once a day and the TVL updates the ratio three times a day. Subject to change.
thanks. What does it signify? life-time value of ICPs staked?
current value of total staked ICP (for both dissolving and not dissolving neurons).