Query editor
-- Dune query 8371361: "[ll] Supported assets by vault" · https://dune.com/queries/8371361-- Panel (stacked bar) on symbiotic-liquid-lane (217325): which redeemable assets are supported by-- which LL vaults. Visual companion to the "Supported assets & volume" table (8179213).---- SHAPE: long format, one row per (asset, vault) EDGE with weight 1 -- the adjacency list of the-- asset<->vault bipartite graph. Dune has no Sankey/chord/heatmap chart, so the graph is flattened into-- a stacked bar: x = asset, y = supported (sum), group by = vault_name, stacking on.-- * each asset's bar height = number of vaults supporting it (= the `vaults_supporting` column on-- 8179213, by construction -- same source, same filter), and its segments name WHICH vaults.-- * assets are the axis and vaults the colour on purpose: ~14 assets vs 4-6 vaults, and the stacked-- dimension is the one that becomes colour. Flipping it (x = vault, stacked by asset) would put-- ~14 recycled colours on height-1 slivers -- unreadable. Revisit only if the weight ever becomes-- per-token SetLimit capacity, where segment heights would differ.-- * ORDER BY drives the category order on the axis (broadest coverage first); the viz has sort_x off.---- SCOPE: active (adapter, token) pairs from base_ll_tokens, so it covers every tracked LL vault ---- including ones with no TVL/depositors yet, which the "Active LL vaults" table (8178968) filters out.-- That is deliberate: it keeps bar heights identical to `vaults_supporting` on 8179213. The excluded-- team test vault is already gone upstream via base_ll_adapters' excluded_vaults list.-- Columns: asset, vault_name, supported, vaults_supporting, token_address, vault_address. tags: [ll]-- Depends on: query_8179210 (base_ll_tokens), query_8128650 (base_vaults -> share_symbol).WITH edges AS (-- one row per (vault, token); GROUP BY collapses the (adapter, token) grain of base_ll_tokens-- (adapter -> vault is 1:1 today, but this keeps the edge count right if a vault ever runs two)SELECTt.token,t.vault,-- labels fall back to a truncated address so a not-yet-indexed erc20 never shows as blankCOALESCE(t.token_symbol, SUBSTR(CAST(t.token AS varchar), 1, 10) || '…') AS asset,COALESCE(bv.share_symbol, SUBSTR(CAST(t.vault AS varchar), 1, 10) || '…') AS vault_nameFROM query_8179210 t -- base_ll_tokensLEFT JOIN query_8128650 bv ON bv.vault = t.vault -- base_vaults (share_symbol)WHERE t.is_activeAND t.vault IS NOT NULLGROUP BY 1, 2, 3, 4)SELECTasset,vault_name,1 AS supported, -- membership weight: 1 per edgeCOUNT(*) OVER (PARTITION BY token) AS vaults_supporting, -- for sorting / cross-check vs 8179213token AS token_address,vault AS vault_addressFROM edgesORDER BY vaults_supporting DESC, asset, vault_name