Query editor
withevm_px as (select blockchain, contract_address, cast(timestamp as date) as d, price, decimalsfrom prices.daywhere timestamp >= timestamp '2026-01-01' and timestamp < timestamp '2026-11-01'and blockchain in ('ethereum','arbitrum','base','optimism','polygon','avalanche_c','bnb','gnosis','scroll','linea','sonic','plasma','mantle','zksync','celo','ink','monad','megaeth')),eth_px as (select d, price from evm_px where blockchain = 'ethereum' and contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2),-- Hyperliquid: perp fees, net of HIP-3 deployer sharehyperliquid as (select date_trunc('month', block_date) as month, 'Hyperliquid' as application,sum(fee_usd) - sum(coalesce(deployer_fee_usd, 0)) as revenue_usdfrom hyperliquid.perp_market_metrics_dailywhere block_month >= date '2026-01-01' and block_month < date '2026-11-01'group by 1),-- Pump.fun: bonding curve + PumpSwap protocol fees, priced per quote tokencurve as (select evt_block_date as d,case when quote_mint is null or quote_mint = '11111111111111111111111111111111'then 'So11111111111111111111111111111111111111112' else quote_mint end as qmint,sum(cast(fee as double)) as fee_rawfrom pumpdotfun_solana.pump_evt_tradeeventwhere evt_block_date >= date '2026-01-01' and evt_block_date < date '2026-11-01'group by 1, 2),pools as (select pool, max(quote_mint) as quote_mint, max(quote_mint_decimals) as qdecfrom pumpdotfun_solana.pump_amm_evt_createpoolevent group by 1),amm as (select s.d, p.quote_mint, p.qdec, sum(cast(s.protocol_fee as double)) as fee_rawfrom (select evt_block_date as d, pool, protocol_fee from pumpdotfun_solana.pump_amm_evt_buyeventwhere evt_block_date >= date '2026-01-01' and evt_block_date < date '2026-11-01'union allselect evt_block_date, pool, protocol_fee from pumpdotfun_solana.pump_amm_evt_selleventwhere evt_block_date >= date '2026-01-01' and evt_block_date < date '2026-11-01') s left join pools p on p.pool = s.poolgroup by 1, 2, 3),quote_mints as (select distinct qmint as mint from curveunionselect distinct quote_mint from amm where quote_mint is not null),sol_mints as (select date_trunc('day', minute) as d, to_base58(contract_address) as mint, avg(price) as price, max(decimals) as decimalsfrom prices.usdwhere blockchain = 'solana' and minute >= timestamp '2026-01-01' and minute < timestamp '2026-11-01'and to_base58(contract_address) in (select mint from quote_mints)group by 1, 2),pumpfun as (select month, 'Pump.fun' as application, sum(usd) as revenue_usd from (select date_trunc('month', c.d) as month, c.fee_raw / power(10, m.decimals) * m.price as usd