TOTAL_INTEREST_ACCRUED | AVG_INTEREST_PER_USER | |
---|---|---|
1 | 12502.4959591895 | 0.087604638329 |
maymoth55imperial-apricot
Updated 2025-04-11
999
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 tb1 as (
select
hour,
price
from ethereum.price.ez_prices_hourly
where symbol = 'WBTC'
and hour::date >= '2025-03-01'
),
repayments as (
select
block_timestamp,
tx_hash,
from_address as borrower_address,
regexp_substr_all(substr(input, 11), '.{64}') as segmented_input,
ethereum.public.udf_hex_to_int(segmented_input[0])::numeric / 1e18 as repaid_musd
from mezo.testnet.fact_traces
where
to_address = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30'
and left(input, 10) ilike '0x8e54c119'
and tx_succeeded = true
),
openTrove as (
select
m.block_timestamp,
m.tx_hash,
m.from_address as borrower_add,
m.value as collateral,
m.value * p.price as collateral_usd,
regexp_substr_all(substr(m.input, 11), '.{64}') as segmented_data,
ethereum.public.udf_hex_to_int(segmented_data[1])::numeric / 1e18 as debt_value
from mezo.testnet.fact_traces m
join tb1 p on trunc(m.block_timestamp, 'hour') = p.hour
where m.to_address = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30'
and left(m.input, 10) ilike '0x8f09162b'
Last run: 15 days ago
1
35B
5s