Query editor
-- =====================================================================-- 01 - VAULT METRICS DAILY: TVL + flows + fees for every client vault-- =====================================================================-- Single combined query = single scan of each chain's logs (vault-- addresses only, from each chain's verified first deployment date).-- Feed ALL dashboard widgets from this one query (Dune supports many-- visualizations per query); pair it with 02_current_snapshot.sql.---- Unit model (verified on-chain per vault, 2026-07-24/25):-- * Deposit/Withdraw `assets` and Harvested `totalUnderlying` are in-- FINAL UNDERLYING units (USDC/EURC/WETH/...). No intermediate-- exchange-rate conversion is needed or applied.-- * TVL(day) = share supply (mint/burn Transfers, exact DECIMAL)-- x underlying-per-share (Deposit/Withdraw assets/shares-- ratio, largest event per day, forward-filled)-- x USD price (prices.day, forward-filled, with fallbacks)-- * Fees: Harvested.sharesMinted valued at mint via-- sharesMinted x totalUnderlying / totalSupply@harvest-log (supply-- reconstructed exactly at each log position; the fee-mint Transfer-- precedes Harvested in the same tx - verified). The two Trezor-- vaults (Morpho VaultV2) never emit Harvested: per reporting policy-- their fees are intentionally shown as 0.---- Cost notes: literal address lists + block_date partition filter +-- prices.day (not minute-level prices.usd) + per-chain start dates.-- Optional: materialize this query (Dune matview) and point widgets +-- 02_current_snapshot at dune.<user>.result_<name> to make dashboard-- refreshes near-free.-- =====================================================================WITHvaults AS (-- ================= VAULT REGISTRY =================-- One row per client vault (OAV). Verified on-chain 2026-07-24/25:-- * vault = the client ERC-4626 vault proxy. Emits Deposit/Withdraw/Harvested.-- * IMPORTANT: event amounts (Deposit/Withdraw `assets`, Harvested `totalUnderlying`)-- are denominated in the FINAL UNDERLYING (USDC/EURC/WETH/...), NOT in the vault-- asset() token. Verified per-vault by comparing event ratios against on-chain-- totalAssets/totalSupply across all chains.-- * intermediate/int_symbol = informational: the receipt token the vault allocates into.-- share_dec = the vault share token decimals (== intermediate decimals, verified).-- * price_* = where to read the USD price in prices.day (USDG on Robinhood Chain has-- no feed -> Ethereum USDG token). price_group fallback: usd->1.0, eur->EURC, mkt->none.-- If you save 00_vault_registry.sql as its own Dune query, replace this CTE body with:-- SELECT * FROM query_<registry_query_id>SELECT * FROM (VALUES-- Deblock('Deblock', 'StakeKit Morpho ETH Moonwell Flagship Vault Crypto On Ramp Standard', 'StakeKit Morpho ETH Moonwell Flagship Vault Crypto On Ramp Standard', 'base', 0xb78bbe5ab780bec54891c9ff51fe3c06418ee7b8, 0xa0e430870c4604ccfc7b38ca7845b1ff653d0ff1, 'mwETH', 18, 0x4200000000000000000000000000000000000006, 'WETH', 18, 'base', 0x4200000000000000000000000000000000000006, 'mkt'),('Deblock', 'StakeKit Morpho ETH Moonwell Flagship Vault Crypto On Ramp Premium', 'StakeKit Morpho ETH Moonwell Flagship Vault Crypto On Ramp Premium', 'base', 0xabcf1256a97fc6677ada02df6639c001841c664f, 0xa0e430870c4604ccfc7b38ca7845b1ff653d0ff1, 'mwETH', 18, 0x4200000000000000000000000000000000000006, 'WETH', 18, 'base', 0x4200000000000000000000000000000000000006, 'mkt'),('Deblock', 'StakeKit Morpho USDC Seamless Fiat On Ramp Standard', 'StakeKit Morpho USDC Seamless Fiat On Ramp Standard', 'base', 0x848ab873e471be52efdfc6be4447b63696c7c304, 0x616a4e1db48e22028f6bbf20444cd3b8e3273738, 'smUSDC', 18, 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'USDC', 6, 'base', 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'usd'),('Deblock', 'StakeKit Morpho USDC Seamless Fiat On Ramp Premium', 'StakeKit Morpho USDC Seamless Fiat On Ramp Premium', 'base', 0xad179a5fe86cf0d873390ccbb07d37e8523a6be0, 0x616a4e1db48e22028f6bbf20444cd3b8e3273738, 'smUSDC', 18, 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'USDC', 6, 'base', 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'usd'),('Deblock', 'StakeKit Morpho USDC Seamless Crypto On Ramp Standard', 'StakeKit Morpho USDC Seamless Crypto On Ramp Standard', 'base', 0xef68cb110356984c34642540263aac1ef25d06f3, 0x616a4e1db48e22028f6bbf20444cd3b8e3273738, 'smUSDC', 18, 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'USDC', 6, 'base', 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'usd'),('Deblock', 'StakeKit Morpho USDC Seamless Crypto On Ramp Premium', 'StakeKit Morpho USDC Seamless Crypto On Ramp Premium', 'base', 0xe2a392ca29a7020d7b6c2df1a3a5ad35f1d80c49, 0x616a4e1db48e22028f6bbf20444cd3b8e3273738, 'smUSDC', 18, 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'USDC', 6, 'base', 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, 'usd'),('Deblock', 'StakeKit Moonwell Flagship EURC Vault Crypto On Ramp Standard', 'StakeKit Moonwell Flagship EURC Vault Crypto On Ramp Standard', 'base', 0xede48327b591231e435948e7428b8eed4055ee80, 0xf24608e0ccb972b0b0f4a6446a0bbf58c701a026, 'mwEURC', 18, 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'EURC', 6, 'base', 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'eur'),('Deblock', 'StakeKit Moonwell Flagship EURC Vault Crypto On Ramp Premium', 'StakeKit Moonwell Flagship EURC Vault Crypto On Ramp Premium', 'base', 0x95ee8fb873c56541fad96f55033c8a8290183e9c, 0xf24608e0ccb972b0b0f4a6446a0bbf58c701a026, 'mwEURC', 18, 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'EURC', 6, 'base', 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'eur'),('Deblock', 'StakeKit Moonwell Flagship EURC Vault Fiat On Ramp Standard', 'StakeKit Moonwell Flagship EURC Vault Fiat On Ramp Standard', 'base', 0x054ea1f836f764fa49873aff0db68e5119ac0c9c, 0xf24608e0ccb972b0b0f4a6446a0bbf58c701a026, 'mwEURC', 18, 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'EURC', 6, 'base', 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'eur'),('Deblock', 'StakeKit Moonwell Flagship EURC Vault Fiat On Ramp Premium', 'StakeKit Moonwell Flagship EURC Vault Fiat On Ramp Premium', 'base', 0x3361fef282f8f0962a7a4306a966d068760de23e, 0xf24608e0ccb972b0b0f4a6446a0bbf58c701a026, 'mwEURC', 18, 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'EURC', 6, 'base', 0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42, 'eur'),('Deblock', 'StakeKit Steakhouse EURCV Fiat On Ramp Premium', 'StakeKit Steakhouse EURCV Fiat On Ramp Premium', 'ethereum', 0xa3381399f20493fddd3b47e978c1407e66884bbb, 0x75741a12b36d181f44f389e0c6b1e0210311e3ff, 'steakEURCV', 18, 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'EURCV', 18, 'ethereum', 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'eur'),('Deblock', 'StakeKit Steakhouse EURCV Fiat On Ramp Standard', 'StakeKit Steakhouse EURCV Fiat On Ramp Standard', 'ethereum', 0xe31631cce2270b83092a4540e2a89bf41d6d6581, 0x75741a12b36d181f44f389e0c6b1e0210311e3ff, 'steakEURCV', 18, 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'EURCV', 18, 'ethereum', 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'eur'),('Deblock', 'StakeKit Steakhouse EURCV Crypto On Ramp Premium', 'StakeKit Steakhouse EURCV Crypto On Ramp Premium', 'ethereum', 0x2f9011063506e3ab5e8b5b3231e5a22fcf1ca56f, 0x75741a12b36d181f44f389e0c6b1e0210311e3ff, 'steakEURCV', 18, 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'EURCV', 18, 'ethereum', 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'eur'),('Deblock', 'StakeKit Steakhouse EURCV Crypto On Ramp Standard', 'StakeKit Steakhouse EURCV Crypto On Ramp Standard', 'ethereum', 0x4e433bf8e9fd338a8fe7755d6a837ca9e5a2d67b, 0x75741a12b36d181f44f389e0c6b1e0210311e3ff, 'steakEURCV', 18, 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'EURCV', 18, 'ethereum', 0x5f7827fdeb7c20b443265fc2f40845b715385ff2, 'eur'),