Hessishskate amm - settle
    Updated 40 minutes ago
    with
    prices as
    (SELECT date_trunc('day',hour) as day, avg(close) as pr, case
    when ASSET_ID = 'ethereum' then 'ETH'
    when ASSET_ID = 'usd-coin' then 'USDC'
    when ASSET_ID = 'tether' then 'USDT'
    when ASSET_ID = 'solana' then 'SOL'
    when ASSET_ID = 'turbo-eth' then 'tETH'
    end as Eclipse_tk
    from crosschain.price.fact_prices_ohlc_hourly
    where hour::date >= '2025-04-01' and
    ASSET_ID in ('ethereum', 'solana', 'usd-coin','turbo-eth','tether')
    and PROVIDER = 'coingecko'
    GROUP by all),

    settle as
    (select
    BLOCK_TIMESTAMP, case
    when mint = 'BeRUj3h7BqkbdfFU7FBNYbodgf8GCHodzKvF9aVjNNfL' then 'SOL'
    when mint = 'AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE' then 'USDC'
    when mint = 'Eth1111111111111111111111111111111111111111' then 'ETH'
    when mint = 'So11111111111111111111111111111111111111112' then 'ETH'
    when mint = 'GU7NS9xCwgNPiAdJ69iusFrRfawjDDPjeMBovhV1d4kn' THEN 'tETH'
    when mint = 'CEBP3CqAbW4zdZA57H2wfaSG1QNdzQ72GiQEbQXyW9Tm' then 'USDT'
    else mint
    end as token,
    AMOUNT/pow(10,decimal) as volume,
    volume*pr as volume_usd,
    TX_ID
    from eclipse.core.fact_transfers
    join prices
    on token = Eclipse_tk
    and BLOCK_TIMESTAMP::date = day
    where BLOCK_TIMESTAMP::date >= '2025-04-01'
    and tx_id in
    (select distinct tx_id
    Last run: 40 minutes ago
    DATE
    TOKEN
    V
    V_USD
    1
    2025-04-06 00:00:00.000tETH0.01806730932.015708175
    2
    2025-04-01 00:00:00.000ETH0.000010010.01875969095
    3
    2025-04-01 00:00:00.000tETH0.000010010.01900744679
    4
    2025-04-07 00:00:00.000tETH0.01020885715.975376667
    5
    2025-04-14 00:00:00.000ETH0.160383147262.641704043
    6
    2025-04-03 00:00:00.000tETH0.0000129460.02356215693
    7
    2025-04-09 00:00:00.000tETH0.04208830464.438122874
    8
    2025-04-21 00:00:00.000tETH0.0016767262.750335055
    9
    2025-04-18 00:00:00.000ETH0.0013480342.139674268
    10
    2025-04-19 00:00:00.000ETH0.0030408034.874073988
    11
    2025-04-17 00:00:00.000ETH0.0032839325.227870599
    12
    2025-04-15 00:00:00.000tETH0.0029578374.869599204
    13
    2025-04-05 00:00:00.000tETH0.01353325224.689794284
    14
    2025-04-09 00:00:00.000ETH0.000148880.2247977581
    15
    2025-04-08 00:00:00.000ETH0.0000408160.06294019375
    16
    2025-04-12 00:00:00.000ETH0.0002043320.327961459
    17
    2025-04-14 00:00:00.000tETH0.02442497840.015227739
    18
    2025-04-08 00:00:00.000tETH0.01582357724.854158325
    19
    2025-04-04 00:00:00.000tETH0.0037316066.821105227
    20
    2025-04-24 00:00:00.000ETH0.064978666114.696767397
    44
    3KB
    20s