mamad-5XN3k3Euler Swell 3 (Daily Actions)
    Updated 2025-06-07
    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: 20 days ago
    DATE
    DEPOSITED
    WITHDRAWN
    SUPPLIED
    BORROW
    REPAYED
    BORROWED
    NET
    1
    2025-01-20 00:00:00.0001426135100135
    2
    2025-01-27 00:00:00.0002201231142336261777868574280822082558534552412433161
    3
    2025-02-03 00:00:00.0001219495313191360-99640728236264543647-1720021723613
    4
    2025-02-10 00:00:00.00019218307541465-561963512319342646314-1414380-4205255
    5
    2025-02-17 00:00:00.00018588262081634-2228071112483108834524138-246945
    6
    2025-02-24 00:00:00.00017076661109060598606836991490941346050252556
    7
    2025-03-03 00:00:00.0001371498103671126782785283973463779376488451
    8
    2025-03-10 00:00:00.0005080012066836-1558834385223416631-31408-1527427
    9
    2025-03-17 00:00:00.00057634614976942657654203416542137661249964
    10
    2025-03-24 00:00:00.0003758220341720934101125379132122412415501-74490
    11
    2025-03-31 00:00:00.000296523634374-337850250196510788-260591-77259
    12
    2025-04-07 00:00:00.00066120881447229516485854644137667734697640467218
    13
    2025-04-14 00:00:00.0005457551465743880011418066271646057160570639544
    14
    2025-04-21 00:00:00.0001397868544479853389507565219823287742565648
    15
    2025-04-28 00:00:00.0008932431070773-177531637617725373-87756-89775
    16
    2025-05-05 00:00:00.000123797074657049140086724745165341559475806
    17
    2025-05-12 00:00:00.0004953528426045669307137206723207890512783180289
    18
    2025-05-19 00:00:00.00074919640861534058148840138491449910-109329
    19
    2025-05-26 00:00:00.000592656526732659233964013707962560440319
    20
    2025-06-02 00:00:00.0003778572980678-26028212777162264768-1987053-615769
    20
    2KB
    58s