Query editor
-- @title Vaults lending against Coinbase tokenized stocks (Base) — daily TVL and 7d APY-- @description Daily total assets and 7-day trailing net APY for every Morpho vault on Base with a live supply-- position in the Coinbase tokenized-stock USDC markets (AAPLc, GOOGLc, NVDAc, METAc, SPCXc; created 7 Sep 2026,-- curated by Steakhouse). Two are Steakhouse vaults (High Yield USDC V1.1 and V2); the rest are third-party.-- @author Romana (Steakhouse Financial)-- @notes TVL: V1.1 vaults = last UpdateLastTotalAssets.updatedTotalAssets per day; V2 vaults = last-- AccrueInterest.newTotalAssets per day; forward-filled. APY: share price = assets/shares from the vault's own-- Deposit/Withdraw events (net of fee dilution), forward-filled, 7d trailing annualised-- ((p_t / p_{t-7})^(365/7) − 1). Vaults with sparse deposit activity show stale/zero APY.-- Window: 2026-08-01 onward. USDC = 6 decimals. Long format: one row per (day, vault).-- @version 1.0with vaults as (select *from (values(0xbeefa7b88064feef0cee02aaebbd95d30df3878f, 'v1', 'Steakhouse High Yield USDC (V1.1)'), (0xbeeff7ae5e00aae3db302e4b0d8c883810a58100, 'v2', 'Steakhouse High Yield USDC (V2)'), (0x3094b241aade60f91f1c82b0628a10d9501462f9, 'v1', 'Max USD'), (0x6b0ef5dd1ced6e26c384e4ccaf72f9dc0a1093d6, 'v1', 'Chipworks USDC'), (0x3647492db41b1249adcd48fa0dc264d47d31c43d, 'v2', 'Treaty RWA'), (0xd8af36cf402a16f064662fe497201b67690551c0, 'v2', 'Stocks Strategies'), (0x7ae6f26d0fd2b510f4ff5a9b167f2d275a7c9de7, 'v2', 'Clearstar Tokenized Stocks USDC')) as t(vault_address, version, vault_name)), calendar as (select dayfrom unnest(sequence(date '2026-08-01', current_date, interval '1' day)) as t(day))-- total assets marks, ta_events as (select v.vault_name, e.evt_block_time, cast(e.updatedTotalAssets as double) / 1e6 as total_assetsfrom metamorpho_vaults_base.metamorphov1_1_evt_updatelasttotalassets einner join vaults v on v.vault_address = e.contract_address and v.version = 'v1'union allselect v.vault_name, e.evt_block_time, cast(e.newTotalAssets as double) / 1e6from morpho_v2_base.vaultv2_evt_accrueinterest einner join vaults v on v.vault_address = e.contract_address and v.version = 'v2'), ta_daily as (select vault_name, cast(date_trunc('day', evt_block_time) as date) as day, max_by(total_assets, evt_block_time) as total_assetsfrom ta_eventsgroup by 1, 2)-- share price marks from deposits / withdrawals, px_events as (select v.vault_name, e.evt_block_time, cast(e.assets as double) / cast(e.shares as double) as pxfrom metamorpho_vaults_base.metamorphov1_1_evt_deposit einner join vaults v on v.vault_address = e.contract_address and v.version = 'v1'where cast(e.shares as double) > 0union allselect v.vault_name, e.evt_block_time, cast(e.assets as double) / cast(e.shares as double)from metamorpho_vaults_base.metamorphov1_1_evt_withdraw einner join vaults v on v.vault_address = e.contract_address and v.version = 'v1'