Afonso_DiazClassifying bridge transactions
    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: 24 days ago
    TYPE
    TX_TYPE
    TRANSACTIONS
    1
    Bridge from Swell$1,000 - $5,00023
    2
    Bridge from Swell$10 - $501372
    3
    Bridge from Swell$100 - $500154
    4
    Bridge from Swell$5,000 - $10,0004
    5
    Bridge from Swell$50 - $10068
    6
    Bridge from Swell$500 - $1,00030
    7
    Bridge from SwellBelow $101571
    8
    Bridge to Swell$1,000 - $5,00082
    9
    Bridge to Swell$10 - $50541
    10
    Bridge to Swell$100 - $500337
    11
    Bridge to Swell$5,000 - $10,0007
    12
    Bridge to Swell$50 - $10088
    13
    Bridge to Swell$500 - $1,00035
    14
    Bridge to SwellBelow $106409
    14
    552B
    14s