0xaimanWhat percentage of the average Solana's user portfolio is staked Solana?
Updated 2022-07-05
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
›
⌄
select sol_used_in_staking, count(STAKER) as n_staker from (select STAKER, INIT_SOL, STAKED_SOL, PS, case
when ps>0 and ps<=10 then '0% to 10% '
when ps>10 and ps<=20 then '10% to 20% '
when ps>20 and ps<=30 then '20% to 30% '
when ps>30 and ps<=40 then '30% to 40% '
when ps>40 and ps<=50 then '40% to 50% '
when ps>50 and ps<=60 then '50% to 60% '
when ps>60 and ps<=70 then '60% to 70% '
when ps>70 and ps<=80 then '70% to 80% '
when ps>80 and ps<=90 then '80% to 90% '
when ps>90 and ps<=100 then '90% to 100% '
end as sol_used_in_staking
from (with raw as (with se as (select tx_id,instruction:parsed:info:stakeAuthority as staker ,
instruction:parsed:info:stakeAccount as stake_act
from solana.core.fact_events
where event_type='delegate' --and tx_id='3SVGeFnyzg1mpuoQj6mW93Q7CQvEk5EeK8BTqBcG6U8k9UNDhPV9WRY46qoPs1vgYEiQ7pBryxTtCPFJFyLAqcmu'
order by 2),
txn as (
select block_timestamp,
account_keys[1]:pubkey as stac,
tx_id, pre_balances[0]/10e8 as SOL_prebal,
post_balances[0]/10e8 as SOL_postbal,
SOL_prebal-SOL_postbal as SOl_staked
from solana.core.fact_transactions
)
Run a query to Download Data