Query editor
-- D1: Dune 8164884 rerun for the full window since endowment inception (Mar 2023), plus per-token breakdown.-- Same accounting basis: Steakhouse ledger accounts 32321* (investment P&L) + 32322* (rewards), excluding the one-off-- Aave USDS LM accrual which is spread daily Aug 2025 - Feb 2026 (145,411.34 USD / 210 days), exactly as in 8164884.-- Rows with token = 'AAVE-USDS-LM-SPREAD' carry the spread; sum(booked_yield_usd + lm_reward_usd) per month = 8164884 total_yield_usd.with base as (select date_trunc('month', ts) as month, cast(token_address as varchar) token, sum(amount) as booked_yieldfrom dune.steakhouse.result_ens_accounting_mainwhere wallet = '0x4f2083f5fbede34c2714affb3105539775f7fe64'and (cast(account as varchar) like '32321%' or cast(account as varchar) like '32322%')and transaction != 'ACCRUAL-LMREWARDS-AETHUSDS-1'and ts >= timestamp '2023-01-01'group by 1,2),lm as (select date_trunc('month', d) as month, sum(145411.33742432442/210) as lm_rewardfrom unnest(sequence(timestamp '2025-08-01', timestamp '2026-02-27', interval '1' day)) as t(d) group by 1)select month, token, booked_yield as booked_yield_usd, 0e0 as lm_reward_usd from baseunion allselect month, 'AAVE-USDS-LM-SPREAD', 0e0, lm_reward from lmorder by 1,2