Query editor
/*@title: Steakhouse Morpho — Chain & Credit Spreads v3 (HY Eth daily top-5 weighted, HY Base = cbXRP), 7d MA@description: HY Ethereum = Steakhouse High Yield USDC V2 (0xbeeff2c5…) daily top-5 markets by allocation,borrow rates weighted by each market's share of that day's top-5 allocation.HY Base = cbXRP/USDC-63%-3 borrow rate (single market).Chain spreads (Base − Ethereum) and same-chain credit spreads, all 7d MA.@author: Romana@notes: Extends query_8823052.V2 allocation read from Morpho Blue supply/withdraw shares of its Morpho-market adapter(s):0xbeefff20… until 2026-04-22, adapter 0xbfe734… from 2026-04-23. Top-5 re-ranked every day.Weights sum to 1 over the top 5 (not over the full vault).hy_eth_top5 column lists that day's markets and weights for audit.Exclusion windows removed before smoothing; MA = 7 observations.@version: 3.0*/with hy_eth_holders (holder, valid_from, valid_to) as (values(0xbeefff209270748ddd194831b3fa287a5386f5bc, date '2000-01-01', date '2026-04-22'), (0xbfe734baab130048e20a64e800c4c2ec25756284, date '2026-04-23', date '2100-01-01')), excluded_windows (excl_from, excl_to, reason) as (values(date '2026-03-22', date '2026-03-25', 'Resolv exploit'), (date '2026-04-18', date '2026-04-21', 'KelpDAO exploit'), (date '2026-04-01', date '2026-04-01', 'Drift exploit / whale deleveraging'), (date '2026-06-11', date '2026-06-13', 'Coinbase High Yield Edition launch')), bench_markets (asset, blockchain, market_id) as (values('hy_cbxrp', 'base', 0xd4a903dc6d949519060c7707f9604fdc9772c046e05c2e3a8fce0bd7196e4109), ('cbbtc_usdc', 'base', 0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836), ('cbbtc_usdc', 'ethereum', 0x64d65c9a2d91c36d56fbc42d69e979335320169b3df63bf92789e2c8883fcc64), ('weth_usdc', 'base', 0x8793cf302b8ffd655ab97bd1c695dbd967807e8367a65cb2f4edaf1380ba1bda), ('weth_usdc', 'ethereum', 0x94b823e6bd8ea533b4e33fbc307faea0b307301bc48763acc4d4aa4def7636cd), ('wsteth_usdc', 'base', 0x13c42741a359ac4a8aa8287d2be109dcf28344484f91185f9a79bd5a805a55ae), ('wsteth_usdc', 'ethereum', 0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc), ('wsteth_weth', 'base', 0x3a4048c64ba1b375330d376b1ce40e4047d03b47ab4d48af484edec9fec801ba), ('wsteth_weth', 'ethereum', 0xb8fc70e82bc5bb53e773626fcc6a23f7eefa036918d7ef216ecfb1950a94a85e)), markets as (selectmarket_id, market_name, loan_decimalsfrom dune.steakhouse.result_morpho_marketswhere blockchain = 'ethereum')-- HY Ethereum: daily allocation of the V2 vault per market, flows as (selectdate(f.evt_block_time) as dt, f.holder, f.market_id, sum(f.shares) as shares_deltafrom (select s.evt_block_time, s.onBehalf as holder, s.id as market_id, s.shares as sharesfrom morpho_blue_multichain.morphoblue_evt_supply as swhere s.chain = 'ethereum' and s.onBehalf in (select holder from hy_eth_holders)union allselect w.evt_block_time, w.onBehalf as holder, w.id as market_id, -w.shares as shares