nucypher / nucypher-monitor

NuCypher network intelligence crawler and web dashboard
7 stars 15 forks source link

"Staked Tokens" is not correct #96

Closed cygnusv closed 2 years ago

cygnusv commented 3 years ago

The number under the label "Staked Tokens" is actually the tokens committed for the next period, but not the actual number of tokens staked in the network. The latter is tricky to compute as there isn't a direct endpoint for this. We have this misconception in several places, not only the monitor.

I think we can call current number something like "Active Staked Tokens", while the other can be "Total Staked Tokens"

cygnusv commented 3 years ago

I ran the following snippet last night:

stakers = staking_agent.get_stakers()
total = 0
for s in stakers:
    x = staking_agent.non_withdrawable_stake(s)
    total += x

The results is 587.35 million, while the status monitor says it's 534 million. That's a nice 91% of active stake.