MrftiS05 copy
Updated 2025-02-08
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
›
⌄
-- forked from par_rn / S05 @ https://flipsidecrypto.xyz/par_rn/q/8A6DZDCzwM_s/s05
SELECT
date_trunc('day', block_timestamp) AS date,
CASE
when contract_name = 'EVK Vault eswETH-1' then 'swETH'
when contract_name = 'EVK Vault epzETH-1' then 'pzETH'
when contract_name = 'EVK Vault eweETH-1' then 'weETH'
when contract_name = 'EVK Vault eezETH-1' then 'ezETH'
when contract_name = 'EVK Vault eWETH-1' then 'WETH'
when contract_name = 'EVK Vault ersETH-1' then 'rsETH'
when contract_name = 'EVK Vault erswETH-1' then 'rswETH'
when contract_name = 'EVK Vault ewstETH-1' then 'wstETH'
end AS token,
event_name,
COUNT(DISTINCT origin_from_address) AS users,
SUM(decoded_log:assets / pow(10, 18)) AS amount
FROM
swell.core.ez_decoded_event_logs
WHERE
event_name IN ('Deposit', 'Borrow', 'Repay', 'Withdraw')
AND origin_to_address = '0x08739cbede6e28e387685ba20e6409bd16969cde'
GROUP BY 1,2,3
order by 1