Query editor
WITH plan AS (SELECT *FROM "query_8187907(fee_discount_pct='25',anchor_bps='500',exploration_bps='500',hub_cap_bps='3000',spoke_cap_bps='1200',candidate_count='20',experiment_count='5',anchor_fee_bps='20')"),live AS (SELECT *FROM "query_8187937(lookback_days='14',min_stonx_emitted='100')"),plan_stats AS (SELECTMAX(plan_total_weight_bps) AS plan_total_weight_bps,SUM(CASE WHEN allocation_bucket = 'production' THEN target_weight_bps ELSE 0 END) / 100.0 AS production_weight_pct,SUM(CASE WHEN allocation_bucket = 'infrastructure' THEN target_weight_bps ELSE 0 END) / 100.0 AS infrastructure_weight_pct,SUM(CASE WHEN allocation_bucket = 'exploration' THEN target_weight_bps ELSE 0 END) / 100.0 AS exploration_weight_pct,SUM(last_7d_gross_fees_usd) AS planned_pairs_competitor_gross_fees_7d_usd,COUNT(*) AS planned_pool_countFROM plan),live_stats AS (SELECTSUM(CASE WHEN both_assets_trusted THEN voter_fees_usd ELSE 0 END) AS trusted_live_voter_fees_usd,SUM(CASE WHEN both_assets_trusted THEN stonx_emitted ELSE 0 END) AS trusted_live_stonx_emitted,SUM(CASE WHEN both_assets_trusted THEN fees_stonx_equivalent ELSE 0 END)/ NULLIF(SUM(CASE WHEN both_assets_trusted THEN stonx_emitted ELSE 0 END), 0)AS trusted_live_fee_value_per_stonx_emitted,COUNT_IF(both_assets_trusted) AS trusted_live_pool_count,COUNT_IF(both_assets_trusted AND sample_confidence = 'usable signal') AS usable_live_pool_count,MAX(CASE WHEN both_assets_trusted THEN days_observed END) AS maximum_live_days_observedFROM live)SELECTp.*,l.*,CASEWHEN usable_live_pool_count = 0 THEN 'Use competitor-fee prior; live sample is not mature.'ELSE 'Use controlled marginal epoch tests to update the prior.'END AS current_model_mode,'Default assumptions: 25% fee discount, 500 bps STONX/USDG, 500 bps exploration, 20 candidates, 14-day live lookback.' AS defaultsFROM plan_stats pCROSS JOIN live_stats l