0-MIDprotocol
    Updated 2025-03-28
    with tab1 as (
    select BLOCK_TIMESTAMP::date as day
    ,DECODED_LOG:bridgeData:bridge as protocol
    ,DECODED_LOG:bridgeData:sendingAssetId as token_address
    ,DECODED_LOG:bridgeData:minAmount as volume
    ,DECODED_LOG:bridgeData:destinationChainId as dst_chain
    ,ORIGIN_FROM_ADDRESS
    ,TX_HASH
    from avalanche.core.ez_decoded_event_logs
    where EVENT_NAME='LiFiTransferStarted'
    and DECODED_LOG:bridgeData:integrator='jumper.exchange'
    and DECODED_LOG:bridgeData:destinationChainId='80094'
    ),
    tab2 as (
    select HOUR::date as day
    ,TOKEN_ADDRESS
    ,SYMBOL
    ,DECIMALS
    ,avg(PRICE) as usd_price
    from avalanche.price.ez_prices_hourly
    group by 1,2,3,4
    union all
    select HOUR::date as day
    ,'0x0000000000000000000000000000000000000000' as TOKEN_ADDRESS
    ,'AVAX' as SYMBOL
    ,'18' as DECIMALS
    ,avg(PRICE) as usd_price
    from avalanche.price.ez_prices_hourly
    where SYMBOL='WAVAX'
    group by 1,2,3,4
    )
    select
    case
    when protocol in ('stargateV2','stargateV2Bus') then 'stargate' else protocol end as platform
    ,sum(volume/pow(10,DECIMALS)*usd_price) as volume_bridged
    ,count(distinct TX_HASH) as bridges
    Last run: 28 days ago
    PLATFORM
    VOLUME_BRIDGED
    BRIDGES
    BRIDGERS
    1
    stargate218062.359553784150112
    2
    relay13752.477663705115104
    2
    73B
    35s