mamad-5XN3k3Euler Swell 3 (Daily Actions)
    Updated 2025-04-05
    with pricet as (
    select
    distinct TOKEN_ADDRESS,
    SYMBOL as sym,
    PRICE
    from crosschain.price.ez_prices_hourly
    join (
    select
    TOKEN_ADDRESS as max_token,
    max(HOUR) as max_hour
    from crosschain.price.ez_prices_hourly
    group by 1
    ) on TOKEN_ADDRESS = max_token and max_hour = hour
    where token_address in ('0xa1290d69c65a6fe4df752f95823fae25cb99e5a7','0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee',
    '0xfae103dc9cf190ed75350761e95403b7b8afa6c0','0x4c9edd5852cd905f086c759e8383e09bff1e68b3',
    '0xbf5495efe5db9ce00f80364c8b423567e58d2110','0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
    '0x8c9532a60e0e7c6bbd2b2c1303f63ace1c3e9811','0xf951e335afb289353dc249e82926178eac7ded78',
    '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2','0x9d39a5de30e57443bff2a8307a4256c8797a3497',
    '0x0a6e7ba5042b38349e437ec6db6214aec7b35676'
    )
    ),
    pools as (
    select
    CONTRACT_ADDRESS as pool,
    concat('0x', substr(topics[2], 24 + 3, 32 + 8)) as asset
    from swell.core.fact_event_logs
    where topics[0] = '0x0cd345140b9008a43f99a999a328ece572a0193e8c8bf5f5755585e6f293b85e'
    )

    select
    date,
    round(sum(deposited_usd),0) as deposited,
    round(sum(withdrew_usd),0) as withdrawn,
    round(sum(deposited_usd) - sum(withdrew_usd),0) as supplied,
    round(sum(borrowed_usd),0) as borrow,
    Last run: 24 days ago
    DATE
    DEPOSITED
    WITHDRAWN
    SUPPLIED
    BORROW
    REPAYED
    BORROWED
    NET
    1
    2025-01-20 00:00:00.00010359800098
    2
    2025-01-27 00:00:00.000159154243064525128509005375889150711838687728982128
    3
    2025-02-03 00:00:00.00088349549534671-69971720445683288694-1244126544410
    4
    2025-02-10 00:00:00.00013901305454475-40643458918971914885-1022989-3041356
    5
    2025-02-17 00:00:00.00013406191502428-16180980560878779517813-179622
    6
    2025-02-24 00:00:00.0001233343802803430540606488355772250716179825
    7
    2025-03-03 00:00:00.0009923637481691754861837553136565239352309
    8
    2025-03-10 00:00:00.0003672001498179-1130979278980302015-23034-1107945
    9
    2025-03-17 00:00:00.00041584310830030754439299611977827321834326
    10
    2025-03-24 00:00:00.0002712689246632024637018389911537873301117-54748
    11
    2025-03-31 00:00:00.000214407360418-146012181246282448-101202-44809
    11
    854B
    24s