Query editor
-- ============================================================================-- cbBTC Solana Address Classification: Infrastructure vs Economic Endpoint-- ============================================================================-- Same problem as EVM (query_7839052): Solana DEX/routing programs (Jupiter,-- Drift, Kamino, etc.) cycle enormous gross volume through wallet-resolved-- owner addresses while holding ~0 net position. Confirmed during exploration:-- turnover ratios from ~100x up to 2.7 BILLION x for known passthrough-- addresses (gross volume in the thousands, net position effectively zero).---- Solana lacks a clean is_smart_contract equivalent in addresses.stats-- coverage, so this classification relies purely on the behavioral signature:-- is_infrastructure = true WHEN turnover_ratio >= 50 AND n_distinct_txs >= 20---- Same single tunable threshold as the EVM model, kept consistent on purpose-- so the cross-chain comparison in later sections is apples-to-apples.-- ============================================================================WITH legs AS (SELECT from_address AS addr, tx_hash, -amount AS signed_amt FROM query_7839505 WHERE flow_type = 'transfer'UNION ALLSELECT to_address AS addr, tx_hash, amount AS signed_amt FROM query_7839505 WHERE flow_type = 'transfer'),addr_window_stats AS (SELECTaddr,COUNT(*) AS n_legs,COUNT(DISTINCT tx_hash) AS n_distinct_txs,SUM(ABS(signed_amt)) AS gross_volume,SUM(signed_amt) AS net_positionFROM legsGROUP BY 1HAVING COUNT(*) >= 10),scored AS (SELECTaddr,n_legs,n_distinct_txs,gross_volume,net_position,ROUND(n_legs * 1.0 / n_distinct_txs, 3) AS legs_per_tx,ROUND(gross_volume / GREATEST(ABS(net_position), 0.00000001), 1) AS turnover_ratioFROM addr_window_stats)SELECT'solana' AS chain,addr,n_legs,n_distinct_txs,gross_volume,net_position,legs_per_tx,turnover_ratio,(turnover_ratio >= 50 AND n_distinct_txs >= 20) AS is_infrastructureFROM scored