Mrftitricky-plum
    Updated 5 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 5 hours agoAuto-refreshes every 12 hours
    DATE
    EVENT_NAME
    Total Volume (USD)
    Cumulative Volume
    1
    2025-03-17 00:00:00.000Withdraw1212.05749794531801795.3910642
    2
    2025-03-17 00:00:00.000Borrow328383.77108844716606302.8239813
    3
    2025-03-17 00:00:00.000Repay51666.78261844712483278.1083368
    4
    2025-03-17 00:00:00.000Deposit312633.61678778839857566.6586601
    5
    2025-03-16 00:00:00.000Repay1031.26079971712431611.3257184
    6
    2025-03-16 00:00:00.000Withdraw3996.74904070131800583.3335663
    7
    2025-03-16 00:00:00.000Deposit3445.23594451239544933.0418723
    8
    2025-03-16 00:00:00.000Borrow1234.33231080816277919.0528929
    9
    2025-03-15 00:00:00.000Withdraw240.54940041731796586.5845256
    10
    2025-03-15 00:00:00.000Deposit1300.48332765239541487.8059278
    11
    2025-03-15 00:00:00.000Borrow1040.803712216276684.7205821
    12
    2025-03-14 00:00:00.000Borrow51463.6936697916275643.9168699
    13
    2025-03-14 00:00:00.000Deposit64826.67657644739540187.3226001
    14
    2025-03-14 00:00:00.000Withdraw30363.92820203531796346.0351252
    15
    2025-03-14 00:00:00.000Repay4554.21512430580.0649186
    16
    2025-03-13 00:00:00.000Repay9653.23697432812426025.8499186
    17
    2025-03-13 00:00:00.000Deposit13618.24689930439475360.6460237
    18
    2025-03-13 00:00:00.000Withdraw11092.82336214531765982.1069232
    19
    2025-03-13 00:00:00.000Borrow9061.49785966616224180.2232001
    20
    2025-03-12 00:00:00.000Repay445.42470547612416372.6129443
    ...
    186
    13KB
    142s