Query editor
-- Vanta Trading payout KPIs + current on-chain reserve.-- Payouts: Vanta's official on-chain ledger (verify/payouts.csv, status=onchain: USDC on Base + SN8 on Bittensor) since 2026-06-01.-- Bank (Stripe) payouts are not included. Cross-check: payoutjunction.com/firms/vanta-trading.-- All rails: Vanta's own lifetime counter (verify.json counters.paid_to_date_usd), on-chain + bank (Stripe), since 2026-04-07.-- Reserve: SN8 alpha in reserve wallet 5EBz...uYn (Taostats, alpha x pool price x TAO/USD)-- + USDC held by Vanta's Base payout wallet 0xdfbe...1ab3 (Dune's native Base data).-- Every CTE returns exactly one row, so the final SELECT reads them as scalar subqueries instead of CROSS JOINs.-- An empty reserve snapshot then shows NULL reserve columns instead of hiding the payout KPIs.WITH payout_stats AS ( -- one scan of the ledger for all payout KPIsSELECT count(*) AS payouts,count(DISTINCT subaccount_id) AS subaccounts_paid,sum(amount_usd) AS total_usd,avg(amount_usd) AS avg_usd,max(amount_usd) AS largest_usd,sum(amount_usd) FILTER (WHERE ts >= now() - INTERVAL '30' DAY) AS last_30d_usd,min(ts) AS first_payout,max(ts) AS last_payout,array_sort(array_agg(amount_usd)) AS sorted_amounts -- for the exact median belowFROM dune.blockchain_explorators.vanta_payouts),payout_median AS ( -- exact median (approx_percentile was ~15% off on small tables)SELECT (element_at(sorted_amounts, (cardinality(sorted_amounts) + 1) / 2)+ element_at(sorted_amounts, cardinality(sorted_amounts) / 2 + 1)) / 2 AS median_usdFROM payout_stats),base_wallet_usdc AS ( -- USDC balance of the Base payout wallet = inflows - outflowsSELECT coalesce(sum(CASE WHEN "to" = 0xdfbe85153cefe647fd3dfcc1273d2c6c062c1ab3 THEN amount ELSE -amount END), 0) AS usdcFROM tokens.transfersWHERE blockchain = 'base'AND block_date >= DATE '2026-03-20' -- partition pruning; the wallet's first USDC transfer (checked 2026-11-22)AND contract_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 -- native USDC on BaseAND ("to" = 0xdfbe85153cefe647fd3dfcc1273d2c6c062c1ab3 OR "from" = 0xdfbe85153cefe647fd3dfcc1273d2c6c062c1ab3)),all_rails AS ( -- 1-row snapshot of Vanta's official totals, incl. bank (Stripe) payoutsSELECT paid_to_date_usd, rewards, bank_rewards, paying_sinceFROM dune.blockchain_explorators.vanta_payout_totals),sn8_reserve AS ( -- 1-row snapshot from TaostatsSELECT alpha_balance, total_usd, alpha_price_tao, tao_usd, tsFROM dune.blockchain_explorators.vanta_reserve_snapshot)-- Rounded for display (Dune tables show raw floats); exact values stay in the uploaded tables.SELECT p.payouts,p.subaccounts_paid,round(p.total_usd) AS total_usd,round(p.avg_usd) AS avg_usd,round((SELECT median_usd FROM payout_median)) AS median_usd,round(p.largest_usd) AS largest_usd,round(p.last_30d_usd) AS last_30d_usd,round((SELECT paid_to_date_usd FROM all_rails)) AS paid_all_rails_usd,(SELECT rewards FROM all_rails) AS payouts_all_rails,(SELECT bank_rewards FROM all_rails) AS bank_payouts,(SELECT paying_since FROM all_rails) AS paying_since,p.first_payout,p.last_payout,round((SELECT total_usd FROM sn8_reserve) + (SELECT usdc FROM base_wallet_usdc)) AS reserve_usd,round((SELECT alpha_balance FROM sn8_reserve), 1) AS reserve_sn8_alpha,round((SELECT total_usd FROM sn8_reserve)) AS reserve_sn8_usd,round((SELECT usdc FROM base_wallet_usdc), 2) AS reserve_usdc,(SELECT alpha_price_tao FROM sn8_reserve) AS alpha_price_tao,