nsa2000axlUSDC Outbound Transfers
Updated 2022-11-04Copy 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
32
33
34
35
36
›
⌄
with
prices as (
select
date_trunc('day',recorded_at) as date,
lower(symbol) as symbol,
avg(price) as price_usd
from osmosis.core.dim_prices
where recorded_at >= '{{start_date}}'
group by 1,2
),
txns as (
select
regexp_substr(sender,'[a-zA-Z]+|\d+') as sender_chain,
regexp_substr(receiver,'[a-zA-Z]+|\d+') as receiver_chain,
concat(sender_chain,'-->',receiver_chain) as transfer_path,
lower(split(currency,'-')[0]) as symbol,
iff(symbol ilike 'u%', substring(symbol, 2, LEN(symbol)), symbol) as sym,
t.*
from axelar.core.fact_transfers t
where transfer_type = 'IBC_TRANSFER_IN'
and block_timestamp >= '{{start_date}}'
and currency = 'uusdc'
),
txns_2 as (
select
(amount/pow(10,decimal)) as amount_usd,
t.*
from txns t
)
select
date_trunc('{{date_range}}',block_timestamp) as date,
sym,
receiver_chain as chain,
count(distinct tx_id) as txn_volume,
sum(amount_usd) as usd_amount,
Run a query to Download Data