cypherCosmos Nakamoto Coeffient over time
Updated 2023-01-12
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
--credits to ALI3N, tweaked for timeframe
with topvalidatorss as (
select address,
delegator_shares,
row_number () over (order by delegator_shares desc) as rn
from cosmos.core.fact_validators
where delegator_shares > 0),
topvalidators as (
select * from topvalidatorss
where rn <= 175),
delegatet as (
select tx_id,
attribute_value as validator_address
from cosmos.core.fact_msg_attributes
where msg_type = 'delegate'
and attribute_key = 'validator'
and tx_succeeded = 'TRUE'),
delegateamount as (
select tx_id,
block_timestamp,
split(ATTRIBUTE_VALUE,'uatom')[0]::numeric/1e6 as Delegate_Amount
from cosmos.core.fact_msg_attributes
where msg_type = 'delegate'
and attribute_key = 'amount'
and tx_id in (select tx_id from delegatet)),
delegatort as (
select tx_id,
block_timestamp,
attribute_value as Delegator
from cosmos.core.fact_msg_attributes
where msg_type = 'coin_spent'
Run a query to Download Data