Query editor
-- Metronome Recovery Dashboard: Morpho Markets Registry (foundation query)-- Every Morpho Blue market on Ethereum/Base whose loanToken is msUSD/msETH, mapped to its-- synth (Synth Registry, query_8222703) and collateral label (Collateral Label Registry,-- query_8223462 -- "Others" if not in that list). Reused across Section 5's debt/borrow/-- repay queries so the loanToken/collateralToken hex-matching logic lives in one place.WITH cm AS (SELECT 'ethereum' AS chain, id,json_extract_scalar(marketParams, '$.loanToken') AS loan,json_extract_scalar(marketParams, '$.collateralToken') AS collFROM morpho_blue_ethereum.morphoblue_evt_createmarketUNION ALLSELECT 'base', id,json_extract_scalar(marketParams, '$.loanToken'),json_extract_scalar(marketParams, '$.collateralToken')FROM morpho_blue_base.morphoblue_evt_createmarket)SELECTcm.chain,cm.id,s.synth,COALESCE(l.label, 'Others') AS collateral_labelFROM cmJOIN query_8222703 s ON s.chain = cm.chain AND LOWER(cm.loan) = LOWER('0x' || to_hex(s.token))LEFT JOIN query_8223462 l ON LOWER(cm.coll) = LOWER('0x' || to_hex(l.address));