Query editor
/*solana dex volume monthly — direct:aggregator ratio filter for Raydium direct⚠️ KNOWN UNDERSTATEMENT — ORCA (do not read the May'26 drop as real)Dune's dex_solana.trades spell stopped emitting version_name = 'whirlpool_v2'after Apr 2026. That is the Token-2022 swapV2 instruction inside the SAMEWhirlpool program (project_main_id whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc),~92% aggregator-routed, running $1-4B/month before it went to zero. The flow didNOT migrate into version_name = 'whirlpool' — total Orca volume simply dropped(Apr: $4.06B + $0.96B = $5.02B → May: $3.07B).Effect: Orca here is roughly $2.1-2.4B/month too low from May 2026 onward, andthe Apr→May decline in the Orca series is partly an artifact, not a real decline.Cross-check Aug'26: DefiLlama $6.20B, Blockworks $5.92B, this query $3.78B.Fix is upstream at Dune. Until then, do not publish an Orca decline narrativewithout checking DefiLlama, and treat the Solana total as a floor (~11% belowDefiLlama, ~15% below Blockworks for Aug'26).Raydium direct-trade volume counts only in pools where direct volume is at mostK × aggregator/router volume in the same month. Pools where direct dominates(e.g. 10× aggregator flow) are treated as wash/MM-only and their direct volumeis dropped.K = 2.0 → allow direct up to 2× aggregator volume per pool."Pool" = the individual AMM liquidity pool, keyed by its unordered token-vaultpair: least/greatest(token_sold_vault, token_bought_vault). This is the TRUE poolgrain (~70-95k Raydium pools/month). Do NOT key this filter on project_main_id —that collapses to ~3 program buckets (AMM v4 / CLMM / CPMM), which makes the filtercoarse and unstable: a single program crossing the 2× line nukes (or passes) ALL itsdirect volume for the month (e.g. Mar'26 dropped 84% of direct at program grain vs astable ~$4B at pool grain). The vault-pair grain lands on DefiLlama (~$4.5B May'26,vs the inflated ~$6.0B under the old program-level filter).Totals & share % now include PumpSwap and PancakeSwap (previously excluded).Every protocol in the unified set contributes to total_monthly_volume and share.PROJECT SELECTION (changed Sep 2026): live_trades now uses a DENY-list instead ofthe old hard-coded allow-list. The invariant is simply:deny exactly the projects that live_other suppliesso nothing is double-counted, and any venue Dune adds to dex_solana.trades flowsinto the totals automatically (falling back to initcap() for its display name inlive_canon) rather than being dropped silently. The old allow-list was missingJupiterZ, which cost ~$1.2B/month; it is now included and named explicitly below.NOT COVERED AT ALL (absent from dex_solana.trades, so the deny-list cannot help —each would need its own source in live_other). Aug'26 per DefiLlama, ~$1.6B total:Deriverse $990M, Jupiter Lend DEX $207M, Archer Exchange $190M, Quay $82M,Futarchy AMM $33M, FluxBeam $30M, Ondo Global Markets $20M, Streamflow $15M.Historical cache (≤ cache_max_month) still has direct fully included withoutthe ratio filter. Regen the cache to apply this filter retroactively for consistency.*/withboundary as (select max(cast(substr(month, 1, 10) as date)) as cache_max_monthfrom dune.syndica.dataset_solana_dex_volume_monthly