Mrftitricky-plum
    Updated 4 hours ago
    WITH assettbl AS (
    SELECT
    origin_from_address AS user,
    DATE_TRUNC('day', block_timestamp) AS date, -- Include the date column
    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,
    contract_address,
    event_name,
    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, 4, 5
    ),
    pricetbl AS (
    SELECT
    DATE_TRUNC('day', hour) AS date,
    symbol,
    AVG(price) AS price
    FROM
    crosschain.price.ez_prices_hourly
    WHERE
    blockchain = 'ethereum'
    GROUP BY 1, 2
    )

    Last run: about 4 hours agoAuto-refreshes every 12 hours
    DATE
    EVENT_NAME
    Total Volume (USD)
    Cumulative Volume
    1
    2025-03-16 00:00:00.000Borrow1237.47586220716277922.1964443
    2
    2025-03-16 00:00:00.000Withdraw3987.5285610431800574.1130866
    3
    2025-03-16 00:00:00.000Repay1033.88717618112431613.9520948
    4
    2025-03-16 00:00:00.000Deposit3454.54746638939544942.3533942
    5
    2025-03-15 00:00:00.000Borrow1040.803712216276684.7205821
    6
    2025-03-15 00:00:00.000Withdraw240.54940041731796586.5845256
    7
    2025-03-15 00:00:00.000Deposit1300.48332765239541487.8059278
    8
    2025-03-14 00:00:00.000Repay4554.21512430580.0649186
    9
    2025-03-14 00:00:00.000Deposit64826.67657644739540187.3226001
    10
    2025-03-14 00:00:00.000Withdraw30363.92820203531796346.0351252
    11
    2025-03-14 00:00:00.000Borrow51463.6936697916275643.9168699
    12
    2025-03-13 00:00:00.000Repay9653.23697432812426025.8499186
    13
    2025-03-13 00:00:00.000Borrow9061.49785966616224180.2232001
    14
    2025-03-13 00:00:00.000Withdraw11092.82336214531765982.1069232
    15
    2025-03-13 00:00:00.000Deposit13618.24689930439475360.6460237
    16
    2025-03-12 00:00:00.000Deposit153549.52048971739461742.3991244
    17
    2025-03-12 00:00:00.000Repay445.42470547612416372.6129443
    18
    2025-03-12 00:00:00.000Borrow122125.87497835216215118.7253404
    19
    2025-03-12 00:00:00.000Withdraw1084.86584831754889.283561
    20
    2025-03-11 00:00:00.000Borrow90584.34945580116092992.8503621
    ...
    182
    13KB
    6s