Query editor
-- [v1+v2] Symbiotic Vaults — the main vaults table on core-stats (viz 7666783).-- Depends on: query_4604948, query_4627716, query_4605920, query_4702777, query_4627664, query_4627759-- (Core v1) + query_8128650 (base_vaults), query_8291505 (base_v2_tvl_daily) (Core v2)---- 2026-08-11: Core v2 vaults added, and delegator_type / slasher_type removed.-- Dropping those two columns is what makes the merge coherent — they are v1-only concepts with no-- VaultV2 equivalent. It also let the LEFT JOIN to query_4628267 go away entirely (one less scan;-- note 4628267 is still executed indirectly, as query_4605920 reads it).---- ⚠️ The `version` column is not decoration — without it a Core v2 row is indistinguishable from a-- dead Core v1 vault, because delegated_stake / opted_in_operators / active_networks are all-- NULL for v2. They are NULL rather than 0 on purpose: the concepts do not exist in v2, which is-- different from "measured, and the answer is zero".---- v2 TVL is sourced from query_8291505 (accrue-based), NOT query_8128675 (base_vault_state). Same-- number, but base_vault_state carries an erc20 transfer scan it needs for share price and fees —-- ~30 credits of work this table has no use for.WITHoptin_operators AS (SELECT vault, count(DISTINCT operator) AS opted_in_operatorsFROM query_4604948 -- [v1] Current operator-vault OptIn status | Matches vaults with their operatorsGROUP BY vault),vaults AS (SELECT * FROM query_4627716 -- [utils] [v1] Symbiotic vaults list),networks_per_vault AS (-- as every vault always has one and only one delegator, we can count active networks-- by delegators instead of vaults to simplify the querySELECT vault, count(DISTINCT network) AS active_networksFROM query_4605920 -- [v1] Network Vaults LimitsWHERE efficient_limit > 0GROUP BY vault),delegated_stakes AS (SELECT vault, sum(stake_usd) AS delegated_stakeFROM query_4702777 -- [v1] Network StakesGROUP BY vault),-- Core v2: latest closed day's TVL per vaultv2_tvl AS (SELECT vault, SUM(TVL_usd) AS tvl_usdFROM query_8291505 -- base_v2_tvl_dailyWHERE dt = CURRENT_DATE - INTERVAL '1' dayGROUP BY vault),v1_rows AS (SELECT'Core v1' AS version,v.vault,coalesce(latest_prices.symbol, cast(v.collateral_address AS varchar)) AS collateral,coalesce(round(tvls.tvl_usd, 1), 0) AS tvl,coalesce(stakes.delegated_stake, 0) AS delegated_stake,