Query editor
-- DAO deployment funds moved -- grand total.---- ONGOING mandates are read from their detail query via query_<detail_id>.-- CLOSED mandates are FROZEN CONSTANTS. See "frozen constants" below.---- query_<id> RE-EVALUATES the source query's SQL live. It does NOT return that-- query's last stored result -- an earlier comment here claimed otherwise and-- was wrong. Proven 5 Oct 2026: this query ran at 15:14 UTC and computed ENS =-- 845,704,304.1956263 while query 7398264's stored result was still the 14 Sep-- value of 825,087,836.6954843. The detail query did not produce 845.7m until-- it was itself re-run at 15:59 UTC.---- Consequence: reading all eight DAOs here re-scanned years of closed history-- every month, for values that cannot change. That was the bulk of this query's-- ~800-credit cost. The four closed mandates are now literals.---- FROZEN CONSTANTS -- verified identical across three INDEPENDENT live-- recomputations of this query (14 Sep, 25 Sep and 5 Oct 2026), to the decimal:-- gnosis 7399422 6442473835.745042 window closed 2025-11-- safe_gnosis 7551658 59856025.4486979 window closed 2025-10-- aave 7550577 139940801.22226825 window closed 2025-07-- arbitrum 7395413 26297846.693073593 window closed 2026-04-- source_query_id is retained for each so the dashboard schema is unchanged and-- the figure stays traceable to the query that produced it.---- RISK: if a closed mandate reopens, or Dune re-indexes / revises historical-- prices, this query will silently keep the stale number. Re-verify the four-- literals against their detail queries QUARTERLY (not monthly):-- GET /api/v1/query/<detail_id>/results?limit=1 -> accumulated_value---- Monthly refresh order (ongoing mandates only):-- 1. re-run the four ongoing detail queries: 7398264, 7401664, 7398724, 7398589-- 2. re-run this query-- Step 1 does not feed step 2 -- this query re-evaluates them live either way.-- The order exists so the dashboard's per-DAO tiles agree with this total.---- Do NOT reintroduce the dune.kpk.result_kpk_moved_funds_total_* materialized-- views. Removed 14 Sep 2026: nothing outside the Dune UI could refresh them,-- which produced the $441m Gnosis gap and a $5.3m ENS gap.WITH dao_totals AS (-- ONGOING mandates -- read live from the detail query.SELECT 'ens' AS dao, 7398264 AS source_query_id,max(accumulated_value) AS deployment_volume_usdFROM query_7398264UNION ALLSELECT 'cow', 7401664, max(accumulated_value)FROM query_7401664UNION ALLSELECT 'balancer', 7398724, max(accumulated_value)FROM query_7398724UNION ALLSELECT 'nexus', 7398589, max(accumulated_value)FROM query_7398589UNION ALL-- CLOSED mandates -- frozen constants, NOT read from their detail queries.SELECT 'gnosis', 7399422, CAST(6442473835.745042 AS double)UNION ALL