Flipside Axelar AnalystsTotal Volume of Transfers Across Different Platforms
    Updated 2025-02-27
    -------------------------------------------------------------------------------------------------------
    ---------------------------------------------------WORMHOLE--------------------------------------------
    -------------------------------------------------------------------------------------------------------

    with wormhole as (select case
    when source_chain in ('bsc','bnb','binance smart chain') then 'Bsc'
    when source_chain in ('avalanche','avalanche c-chain') then 'Avalanche'
    when source_chain='ethereum' then 'Ethereum'
    when source_chain='arbitrum' then 'Arbitrum'
    when source_chain='polygon' then 'Polygon'
    when source_chain='optimism' then 'Optimism'
    when source_chain='base' then 'Base'
    end as "Source Chain",
    round(sum(amount_usd),2) as "Volume of Transfers",
    count(distinct tx_hash) as "Number of Transfers",
    count(distinct source_address) as "Number of Users",
    count(distinct destination_chain) as "Number of Routes",
    'Wormhole' as "Cross-Chain Service"
    from crosschain.defi.ez_bridge_activity
    where platform in ('wormhole')
    and block_timestamp::date>='2024-01-01'
    and source_chain in ('arbitrum','avalanche','base','bsc','bnb','binance smart chain','ethereum','optimism','polygon','avalanche c-chain')
    group by 1, 6),

    -------------------------------------------------------------------------------------------------------
    ---------------------------------------------------LAYERZERO--------------------------------------------
    -------------------------------------------------------------------------------------------------------

    layer0 as (
    with dune_data AS (
    SELECT livequery.live.udf_api(
    'https://api.dune.com/api/v1/query/4599633/results?api_key=kmCBMTxWKBxn6CVgCXhwDvcFL1fBp6rO'
    ) AS response),
    flatten_dune_data AS (SELECT
    value:"result":"rows" as data
    FROM dune_data, table(flatten(response, ''))
    QueryRunArchived: QueryRun has been archived