Query editor
-- Metric / 06: TVL spike forensics - transiently-priced token hunt-- Findings so far for the ~$40M one-day TVL spike (2026-07-14):-- 1. NO transfers >= $500k in/out of any Metric pool Jul 12-17 -> not parked capital-- 2. NO >=2x day-over-day price move on any registered pool token -> not a price move-- Remaining hypothesis: query 05's TVL counts EVERY token ever transferred to a pool-- (incl. airdropped junk) and inner-joins prices.day. A token that Dune priced ONLY-- around Jul 14 (listed then dropped from the feed) contributes TVL on exactly that-- day -> a perfect one-day spike. This finds tokens priced on Jul 14 but NOT Jul 10,-- that Metric pools held, valued at their Jul-14 price.WITH pools AS (SELECT blockchain, poolFROM query_8021466 -- Metric PropAMM - 01 Pool Registry),cand AS (SELECT blockchain, contract_address, price, decimalsFROM prices.dayWHERE timestamp = TIMESTAMP '2026-07-14'AND (blockchain, contract_address) NOT IN (SELECT blockchain, contract_addressFROM prices.dayWHERE timestamp = TIMESTAMP '2026-07-10')),flows AS (SELECTt.blockchain,t.contract_address AS token,SUM( CAST(t.amount_raw AS DOUBLE) *( (CASE WHEN t."to" = p.pool THEN 1 ELSE 0 END)- (CASE WHEN t."from" = p.pool THEN 1 ELSE 0 END) ) ) AS net_rawFROM tokens.transfers tJOIN pools pON p.blockchain = t.blockchainAND (p.pool = t."to" OR p.pool = t."from")JOIN cand cON c.blockchain = t.blockchainAND c.contract_address = t.contract_addressWHERE t.block_time < TIMESTAMP '2026-07-15'GROUP BY 1, 2)SELECTf.blockchain,e.symbol,f.token,f.net_raw / pow(10, c.decimals) AS balance_jul14,c.price AS price_jul14,GREATEST(f.net_raw, 0) / pow(10, c.decimals) * c.price AS tvl_contribution_usdFROM flows fJOIN cand cON c.blockchain = f.blockchain AND c.contract_address = f.tokenLEFT JOIN tokens.erc20 eON e.blockchain = f.blockchain AND e.contract_address = f.tokenORDER BY tvl_contribution_usd DESCLIMIT 50