SocioCryptoveQi Mint-burn Net
Updated 2025-02-09
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
›
⌄
-- forked from f568a40e-48af-48fe-898d-7febfd499c64
-- forked from 94a0c2d2-1670-48d1-96e7-f6a1a260e38d
SELECT date, sum(case when action = 'Mint' then amnt else -1*amnt end) as net_minted,
sum(net_minted)over (order by date) as circulating_supply
FROM(
SELECT 'Mint' as action,
date_trunc('week',block_timestamp) as date,
sum(decoded_log:value)/pow(10,18) as amnt,
count(DISTINCT decoded_log:beneficiary) as n_users
FROM avalanche.core.fact_decoded_event_logs
WHERE contract_address = '0x7ee65fdc1c534a6b4f9ea2cc3ca9ac8d6c602abd'
AND event_name = 'Mint'
group by date
UNION
SELECT 'Burn' as action,
date_trunc('week',block_timestamp) as date,
sum(decoded_log:value)/pow(10,18) as amnt,
count(DISTINCT decoded_log:account) as n_users
FROM avalanche.core.fact_decoded_event_logs
WHERE contract_address = '0x7ee65fdc1c534a6b4f9ea2cc3ca9ac8d6c602abd'
AND event_name = 'Burn'
group by date
)
group by 1
ORDER by date DESC
QueryRunArchived: QueryRun has been archived