kiacryptoUsses of USDH
Updated 2022-10-11Copy Reference Fork
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 base as (
select *
from solana.core.fact_transactions left join solana.core.dim_labels on instructions[0]:programId = address
where
block_timestamp >= current_date - 60 and
succeeded = TRUE and
(inner_instructions[0]:instructions[0]:parsed:info:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' or
inner_instructions[1]:instructions[0]:parsed:info:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' or
pre_token_balances[0]:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' or
pre_token_balances[1]:mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX')
)
select
case
when instructions[0]:programId = '6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc' then 'Kamino Program'
when instructions[0]:programId = 'JUP3c2Uh3WA4Ng34tw6kPd2G4C5BB21Xo36Je1s32Ph' then 'jupiter aggregator v3'
when instructions[0]:programId = 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc' then 'Orca'
when instructions[0]:programId = 'JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB' then 'jupiter aggregator v4'
when instructions[0]:programId = 'HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T' then 'Hubble Protocol'
when instructions[0]:programId = 'TLPv2tuSVvn3fSk8RgW3yPddkp5oFivzZV3rA9hQxtX' then 'Tulip Protocol'
when instructions[0]:programId = 'EN1GMA5PDSgoAUgBEdSKCcGWA4xik8qjbZ58BiRs1cEY' then 'Raydium Enigma Protocol'
when instructions[0]:programId = 'ComputeBudget111111111111111111111111111111' then 'ComputeBudget'
else address_name
end as address_names,
count(distinct tx_id) as count,
count(distinct signers[0]) as unique_userd,
sum(iff(inner_instructions[1]:instructions[0]:parsed:info:amount/1e6 is null, 0, inner_instructions[1]:instructions[0]:parsed:info:amount/1e6)) as volume
from base
where address_names is not null
group by 1
order by 2 desc
Run a query to Download Data