Query editor
-- Metronome Recovery Dashboard: LP Synth TVL, current (Section 1 / Section 6)-- Estimated, synth-side liquidity only. Current msUSD/msETH balance held by each registered-- LP pool (query_8222715), valued at the latest daily price. Does NOT include the paired-- asset (USDC/WETH/FRAXBP/etc) on the other side of each pool -- full pool TVL accounting-- lands in the Section 6 / Phase 2 Liquidity buildout.WITH lp_bal AS (SELECT p.venue, p.pool, p.chain, t.synth,SUM(CASE WHEN t."to" = p.address THEN t.amount ELSE 0 END)- SUM(CASE WHEN t."from" = p.address THEN t.amount ELSE 0 END) AS heldFROM dune.matthomas.result_synth_transfers tJOIN query_8222715 p ON p.chain = t.chain AND (t."to" = p.address OR t."from" = p.address)GROUP BY 1, 2, 3, 4),latest_price AS (SELECT label, AVG(price_usd) AS price_usdFROM dune.matthomas.result_daily_pricesWHERE day = (SELECT MAX(day) FROM dune.matthomas.result_daily_prices)GROUP BY 1)SELECTlp.venue,lp.pool,lp.chain,lp.synth,lp.held,lp.held * COALESCE(pr.price_usd, 0) AS held_usdFROM lp_bal lpLEFT JOIN latest_price pr ON pr.label = lp.synthWHERE lp.held > 0.001ORDER BY held_usd DESC;