N_WITHDRAWN | N_WITHDRAWNERS | TOTAL_COLLAT_AMOUNT | TOTAL_MUSD_WITHDRAWN | TOTAL_COLLAT_AMOUNT_USD | |
---|---|---|---|---|---|
1 | 1378 | 858 | 10.250316 | 29421768.55789 | 874751.495375645 |
0xHaM-dTotal Withdrawn mUSD
Updated 2025-05-01
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 priceTb as (
select
hour,
price
from ethereum.price.ez_prices_hourly
where SYMBOL = 'WBTC'
and hour::date >= '2025-03-01'
)
, eventTb as (
select
BLOCK_TIMESTAMP,
TX_HASH,
ORIGIN_FROM_ADDRESS as borrower_add,
regexp_substr_all(SUBSTR(data, 3, len(data)), '.{64}') AS segmented_data,
regexp_substr_all(SUBSTR(INPUT, 11, len(INPUT)), '.{64}') AS segmented_input_data,
ethereum.public.udf_hex_to_int(segmented_data[2])::int/1e18 as collat_amount,
(ethereum.public.udf_hex_to_int(segmented_data[2])::int/1e18)*price as collat_amount_usd,
ethereum.public.udf_hex_to_int(segmented_input_data[1])::int/1e18 as mUSD_withdrawn_amt,
from mezo.testnet.fact_event_logs log
join mezo.testnet.fact_traces trace using(TX_HASH)
join priceTb on trunc(BLOCK_TIMESTAMP, 'hour') = hour
where log.CONTRACT_ADDRESS = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30'
and left(input,10) ilike '0x5f705f69'
and TX_SUCCEEDED = TRUE
and log.TOPIC_0 = '0xf575eb5cdee005607f56587351e18943ddacd11756b9d37980ec251797ff136c'
)
select
count(distinct TX_HASH) as n_withdrawn,
count(distinct borrower_add) as n_withdrawners,
sum(collat_amount) as total_collat_amount,
sum(mUSD_withdrawn_amt) as total_mUSD_withdrawn,
sum(collat_amount_usd) as total_collat_amount_usd,
from eventTb
Last run: 23 days ago
1
54B
7s