Updated 2025-05-19
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as token_price_usd
    from
    crosschain.price.ez_prices_hourly
    where
    blockchain = 'ethereum'
    and token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    to_address as user,
    value as amount,
    amount * token_price_usd as amount_usd,
    'Bridge to Swell' as type
    from
    swell.core.fact_transactions
    join
    pricet on block_timestamp::date = date
    where
    from_address = '0xf70da97812cb96acdf810712aa562db8dfa3dbef'
    and tx_succeeded
    and from_address != to_address
    and tx_hash not in (select distinct tx_hash from swell.core.fact_event_logs)

    union all

    select
    tx_hash,
    Last run: 13 days ago
    TYPE
    TRANSACTIONS
    USERS
    VOLUME
    AVERAGE_AMOUNT
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    1
    Bridge from Swell3222276988.5510395240.02748325249156952.30565528648.712695734
    2
    Bridge to Swell74996297164.0016888310.02186980782355416.94474003447.395245331
    2
    178B
    18s