tkvresearchDex volume I L2 VS ETH (%)
    Updated 2024-08-26
    with

    L AS ( select * from (VALUES

    ( 'Ethereum','Ethereum','Ethereum'),
    ( 'L2','OptimisticRollup','Base'),
    ( 'L2','OptimisticRollup','Arbitrum'),
    ( 'L2','OptimisticRollup','Optimism'),
    ( 'L2','OptimisticRollup','Manta'),
    ( 'L2','OptimisticRollup','Kroma'),
    ( 'L2','OptimisticRollup','Public Good'),
    ( 'L2','zkRollup','Scroll'),
    ( 'L2','zkRollup','zkSync Era'),
    ( 'L2','zkRollup','Linea'),
    ( 'L2','zkRollup','Polygon zkEVM'),
    ( 'L2','zkRollup','Starknet'),
    ( 'L2','Optimium','Mantle')

    ) as l1(tag, technology, chain) )


    select CASE when tag = 'L2' then 'LAYER2' else 'ETHEREUM' end as chain, sum(volume) as volume
    from external.defillama.fact_dex_volume as a
    join L as b on lower(a.chain) = lower(b.chain)
    where date_trunc('day',date) >= CURRENT_DATE - interval '8 day'
    group by 1
    order by volume desc



    QueryRunArchived: QueryRun has been archived