nitsBalance of Staked Addresses
Updated 2022-03-17
99
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
›
⌄
-- Summarize participation in governance activities by address. What is the distribution of level of governance activity among Terra addresses?
-- How is this distribution related to how large (in holdings) the addresses are?
with luna_staked as (
select
date,
address,
balance_type,
currency,
sum(balance) as total_staked_luna
from terra.daily_balances
where currency = 'LUNA'
and balance_type = 'staked'
and date BETWEEN '2021-07-01' and '2021-10-05'
group by 1, 2, 3, 4
order by total_staked_luna desc ),
powerv_ranking as(
select
address,
case when total_staked_luna < 100 then '< 100'
when total_staked_luna < 1000 then '< 1000'
when total_staked_luna < 10000 then '< 10000'
when total_staked_luna < 100000 then '< 100000'
when total_staked_luna < 1000000 then '< 1000000'
when total_staked_luna < 10000000 then '< 10000000'
when total_staked_luna < 100000000 then '< 100000000'
else '> 100000000'
end as staked_luna
--total_staked_luna as voting_power
from luna_staked)
select
staked_luna,
count(*) as addresses_in_category
from powerv_ranking
group by 1
order by 1