Query editor
-- One row per Morpho Blue liquidation on a market whose COLLATERAL is a tokenised-- stock (asset list: query 8725471). Built on the decoded event, not-- result_morpho_liquidation_events, which has no bad-debt column and lags the chain.-- Reconciled against the Morpho API: same events by (tx hash, market) on 2026-10-02 (140)-- and 2026-10-09 (143).---- Times are bucketed in New York time (America/New_York, DST-aware):-- Monday open Sun 20:00 -> Mon 12:00 ET (16h/week): first prices after the weekend-- (24/5 oracles restart Sun 20:00 ET, the bCOIN feed Mon 08:57 UTC)-- and the US cash open-- US session 09:30 -> 16:00 ET, Mon 12:00 -> 16:00 and Tue-Fri (30h/week)-- Extended hours every other weekday hour (74h/week)-- Weekend Fri 20:00 -> Sun 20:00 ET (48h/week)-- US market holidays are not modelled.---- oracle_schedule comes from query 8884635 (manual, verified on-chain); any other-- oracle is 'Not verified'.---- USD = loan-token amount x current loan-token price (all loan tokens so far are-- stablecoins), as in query 4216704. is_dust = repaid $1 or less, the Morpho Liquidation-- dashboard's rule (query 7355309: repaid_amount_usd > 1). Bad-debt clean-ups (repaid ~0,-- bad debt realised) are dust by this rule: their timing is the liquidator's, not the market's.WITH stocks AS (SELECT blockchain, address, symbol FROM query_8725471),mkt AS (SELECTchain AS blockchain,id,from_hex(substr(json_extract_scalar(marketParams, '$.collateralToken'), 3)) AS collateral_token,from_hex(substr(json_extract_scalar(marketParams, '$.loanToken'), 3)) AS loan_token,from_hex(substr(json_extract_scalar(marketParams, '$.oracle'), 3)) AS oracle,CAST(json_extract_scalar(marketParams, '$.lltv') AS double) / 1e18 AS lltvFROM morpho_blue_multichain.morphoblue_evt_createmarket),px AS (SELECT blockchain, contract_address, symbol, decimals, priceFROM dune.morpho.result_morpho_api_prices_extended),oracle_schedule AS (SELECT blockchain, oracle, oracle_schedule FROM query_8884635),liq AS (SELECTl.evt_block_time AS time,at_timezone(l.evt_block_time, 'America/New_York') AS t_et,l.chain AS blockchain,l.id AS market_id,s.symbol AS collateral_symbol,pl.symbol AS loan_symbol,m.lltv,m.oracle,l.repaidAssets / pow(10, pl.decimals) * pl.price AS repaid_usd,l.badDebtAssets / pow(10, pl.decimals) * pl.price AS bad_debt_usd,l.borrower,l.caller AS liquidator,l.evt_tx_hash AS hashFROM morpho_blue_multichain.morphoblue_evt_liquidate lJOIN mkt m ON m.id = l.id AND m.blockchain = l.chainJOIN stocks s ON s.address = m.collateral_token AND s.blockchain = m.blockchain