Query editor
-- @title: Steakhouse Prime EUR vaults (EURCV / EURC) — organic APY, 7d avg (7m), EURC ETH ex April squeezes v4-- @description: 7-day trailing average of daily organic (native, ex-rewards) supply APY for the three Steakhouse Prime EUR Vault V2s on Morpho, one series per vault. For EURC ETH, two windows are excluded so the chart shows the underlying trend rather than two short liquidity squeezes.-- @author: Romana / Steakhouse Financial-- @notes: v4 of 8795940. EXCLUDED DAYS (EURC ETH only): 2026-04-02 to 2026-04-11 and 2026-04-22 to 2026-04-29. Both were real events in the WBTC/EURC-86%-5 market on Ethereum: (1) kpk EURC Yield withdrew ~EUR 4.3m over 31 Mar–4 Apr, utilisation 97–100%, market rate up to 11.4%; (2) post-KelpDAO withdrawals 19–22 Apr, utilisation 99–100%, market rate up to 10.4%. Excluded days are dropped from the output AND from the 7d average (the average uses only the non-excluded days inside each 7-row window), so no spike residue leaks into the following week. The line chart joins the points either side of each gap with a straight segment. Unfiltered version: 8795940. vault_type = 'v2'. supply_rate is already annualised — do NOT multiply by 365. Current partial day excluded (dt < current_date). Floor supply_usd > 1k.-- @version: 4with vaults (blockchain, vault_address, vault_label, sort_order) as (values('ethereum', 0xbeef0c075da5d01112ae5cf34d257074fb5ddb2f, 'EURCV ETH', 1), ('base', 0xbeef009f28ccf367444a9f79096862920e025dc1, 'EURC BASE', 2), ('ethereum', 0xbeef003e31546c7210687f1a7b40d096be83ec58, 'EURC ETH', 3)), daily as (selectd.dt, v.vault_label, v.sort_order, max(d.supply_rate) as supply_rate, max(d.supply_index) as supply_index, max(d.supply_usd) as supply_usdfrom dune.steakhouse.result_morpho_vaults_data_union as dinner join vaults as von v.vault_address = d.vault_addressand v.blockchain = d.blockchainwhere d.vault_type = 'v2'and d.dt >= current_date - interval '7' month - interval '7' dayand d.dt < current_dateand is_finite(d.supply_rate)and is_finite(d.supply_index)group by 1, 2, 3), flagged as (selectdt, vault_label, sort_order, supply_usd, supply_rate, supply_index, vault_label = 'EURC ETH'and (cast(dt as date) between date '2026-04-02' and date '2026-04-11'or cast(dt as date) between date '2026-04-22' and date '2026-04-29') as is_excludedfrom dailywhere supply_usd > 1000), apy as (selectdt, vault_label, sort_order, supply_usd, is_excluded, supply_rate as organic_apy, casewhen count(*) over (partition by vault_label order by dt rows between 6 preceding and current row) = 7