NUM_TXNS | NUM_USERS | DEPOSIT_AMOUNT_USD | WITHDRAW_USD | BORROW_USD | REPAY_USD | |
---|---|---|---|---|---|---|
1 | 3056 | 240 | 47198474.8638696 | 35939359.4009986 | 22333014.0075431 | 15177213.9852965 |
saeedmzn[Euler] - Total
Updated 2025-04-10
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 euler_txns as (
select
tx_hash,
block_timestamp::date date ,
event_name type ,
origin_from_address user ,
UPPER(REGEXP_REPLACE(contract_name, '^EVK Vault e(.*?)ETH-[1-2]$', '\\1ETH')) symbol,
( decoded_log:assets) / 1e18 amount
-- case when type = 'Deposit' then ( decoded_log:assets) / 1e18
-- when type = 'Repay' then ( decoded_log:assets) / 1e18
-- when type = 'Borrow' then -( decoded_log:assets) / 1e18
-- when type = 'Withdraw' then -( decoded_log:assets) / 1e18
-- end as amount
from swell.core.ez_decoded_event_logs
where origin_to_address = '0x08739cbede6e28e387685ba20e6409bd16969cde'
and event_name in ( 'Borrow','Deposit', 'Withdraw','Repay' )
and UPPER(REGEXP_REPLACE(contract_name, '^EVK Vault e(.*?)ETH-1$', '\\1ETH')) is not null
and block_timestamp::date >='2025-01-17'
),
prices as (
SELECT
DATE_TRUNC(day, hour) date,
symbol,
median(price) price
FROM ethereum.price.ez_prices_hourly join euler_txns using (symbol)
where date_trunc(day,hour)::date >= '2025-01-17'
GROUP BY 1,2
),
final as (
select * exclude price , amount*price amount_usd from euler_txns join prices using (date , symbol)
)
--'Borrow','Deposit', 'Withdraw','Repay'
select
count (distinct tx_hash) num_txns ,
count (distinct user) num_users ,
sum (iff(type='Deposit',amount_usd,0)) Deposit_amount_usd ,
Last run: 16 days ago
1
80B
7s