BlockTrackerpercentage of total supply staked
Updated 2024-07-04
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
›
⌄
with total_supply as (
WITH json as (
SELECT
livequery.live.udf_api(
'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=axelar&order=market_cap_desc&per_page=100&page=1&sparkline=false&locale=en'
) as resp
)
SELECT
value:total_supply as "Total Supply"
FROM json,
LATERAL FLATTEN(input => json.resp:data) as value
)
,
total_staked as (
select
sum(case when action IN ('delegate') then amount/1e6 else 0 end)
-sum(case when action IN ('undelegate') then amount/1e6 else 0 end) as "Total AXL Staked"
from axelar.gov.fact_staking
where tx_succeeded = TRUE
)
select
100 * "Total AXL Staked" / "Total Supply" as "Percentage of Total Supply Staked"
from total_staked
join total_supply ON TRUE
QueryRunArchived: QueryRun has been archived