Query editor
-- Veda MetaMask Base mUSD vault (Monad): 7d APY to holders at each Veda share price update, and what it is made of.-- A share price update is the Accountant's YieldRecorded event (Veda harvests twice a day, ~06-09 and ~19-21 UTC):-- the yield found since the last one vests linearly over the next 12h, so each row is one 12h period.-- Rate at an update = the ExchangeRateUpdated in the same transaction, just before YieldRecorded.-- Period APR = 365 days x (rate - previous rate) / rate / period length.-- 7d APY = 365 days x (rate - rate 14 updates back) / rate / time since then (Veda's (r_end - r_start) / r_end over ~7 days).-- The rate is net of the Accountant's fees (0.50% platform; 11.11% performance on net yield = 10% of gross), so the parts are too:-- MON incentives: USDC from the mon-yield job's MON sales (Manager calls whose only flow is USDC in), less the performance fee.-- SOFR top-ups: mUSD Consensys sends straight to the BoringVault (from the SOFR distributor, or minted to it before 2026-09-24), less the performance fee.-- One-off transfers: any other mUSD or USDC sent straight to the BoringVault outside Manager calls, deposits and withdrawals-- (e.g. MetaMask's 10,000 mUSD to the Base vault on 2026-11-20), less the performance fee.-- Lending: the rest (Morpho parent vaults and Aave, net of all fees).-- A flow counts in the period after the update that first sees it (Veda records it then and vests it over the next 12h).-- Each part is its 14-period sum / average NAV x 365 days / window length, NAV = BoringVault shares x rate at the update.WITH params AS (SELECTDATE '2026-05-27' AS deploy_date,TIMESTAMP '2026-07-24 00:00:00' AS start_time, -- production runtime start; earlier the vault was too small to split0.1111 AS performance_fee, -- on net yield, so holders keep 1 / (1 + fee) of gross0x1C8a336051D2024E318A229d01F9F6CF96efD316 AS boring_vault,0xf05bFFA1c0aeF77473B5D8A15502d52f0F41dF2B AS manager,0x98A45D90E81849a5743241d3ff765F9Fd788206a AS accountant,0xacA92E438df0B2401fF60dA7E4337B687a2435DA AS musd,0x754704Bc059F8C67012fEd69BC8A327a5aafb603 AS usdc,0xBEEF067C9D2591aCCAB7d1C336a41ca3bd45b8f5 AS steak_musd,0xBEEF0C61DA39F7EA2bFa7B0f9d6338A3a2DD2fF0 AS steak_usdc,0x4177a5287fae4767311dad02547b57d1b8cf5fbf AS sofr_sender,0x0000000000000000000000000000000000000000 AS zero_addr,0xAdc33E147ddc92e03A2f9818DbeDEDbAe56829df AS server_signer,0xfC580f2a77e85f1F47b60F096D36fDc97cE2d827 AS operator_signer,0x244b0f6a AS manager_selector), accountant_logs AS (SELECT l.block_time, l.block_number, l.index, l.tx_hash, l.topic0, l.dataFROM monad.logs lCROSS JOIN params pWHERE l.block_date >= p.deploy_dateAND l.contract_address = p.accountantAND l.topic0 IN (0x388f446e9526fe5c9af20a5919b342370c8a7c0cb05245afe1e545658fa3cdba, -- ExchangeRateUpdated(uint256)0x2583e410b6b90509698867351826d69a02f114f22c9b563a6247bf598e352b4c -- YieldRecorded(uint256,uint64))), updates AS (SELECTh.block_time AS time,CAST(h.block_number AS decimal(38, 0)) * 100000 + h.index AS ord,max_by(CAST(varbinary_to_uint256(r.data) AS double) / 1e6, r.index) AS rateFROM accountant_logs hJOIN accountant_logs rON r.tx_hash = h.tx_hashAND r.block_number = h.block_numberAND r.index < h.indexAND r.topic0 = 0x388f446e9526fe5c9af20a5919b342370c8a7c0cb05245afe1e545658fa3cdbaWHERE h.topic0 = 0x2583e410b6b90509698867351826d69a02f114f22c9b563a6247bf598e352b4cGROUP BY 1, 2), transfers AS (SELECTl.tx_hash,CAST(l.block_number AS decimal(38, 0)) * 100000 + l.index AS ord,l.contract_address,varbinary_substring(l.topic1, 13, 20) AS from_addr,