mamad-5XN3k3Euler Swell 3 (Daily Actions)
    Updated 2025-05-19
    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: 15 days ago
    DATE
    DEPOSITED
    WITHDRAWN
    SUPPLIED
    BORROW
    REPAYED
    BORROWED
    NET
    1
    2025-01-20 00:00:00.0001346128100128
    2
    2025-01-27 00:00:00.0002088507940126171687246270421201975108506701211805450
    3
    2025-02-03 00:00:00.0001154901612515500-96648426755564307347-1631791665306
    4
    2025-02-10 00:00:00.00018227577154150-533139311686262509757-1341131-3990262
    5
    2025-02-17 00:00:00.00017694021971660-2022591053501103036823133-225392
    6
    2025-02-24 00:00:00.00016220911050874571217792520465438327082244134
    7
    2025-03-03 00:00:00.000129851699640119887680803269559738473460403
    8
    2025-03-10 00:00:00.0004821391957915-1475776364995394952-29957-1445819
    9
    2025-03-17 00:00:00.00054709214209340500051351815657735694248058
    10
    2025-03-24 00:00:00.0003557501323481032269124033492009592393758-71067
    11
    2025-03-31 00:00:00.000280927601885-320958236862484536-247674-73284
    12
    2025-04-07 00:00:00.00062688011370706489809551758837257444450138447957
    13
    2025-04-14 00:00:00.0005175631441303776259417119591559064152895609699
    14
    2025-04-21 00:00:00.0001324420515503808918480816208157272659536259
    15
    2025-04-28 00:00:00.0008464901015609-169119603873686992-83119-86000
    16
    2025-05-05 00:00:00.000117272570721546551082213742864639349072019
    17
    2025-05-12 00:00:00.0004696020403588266013835246773037742486935173203
    18
    2025-05-19 00:00:00.0006114224888362543580529335512742
    18
    1KB
    50s