Query editor
-- @title Steakhouse AUSD vaults — APY timeseries v11-- @description 7d rolling mean of daily share-price APY for Steakhouse HY AUSD (Monad) and Steakhouse High Yield Instant / bbqAUSD (Ethereum). Monad: within 2026-07-22..2026-07-30 only, days with daily APY > 10% are excluded before averaging. Ethereum: last 3 days shown as a 5d mean. Net of fees, excludes incentives.-- @author Steakhouse Financial-- @notes v11 of 8643600. APY columns are fractions (0.091 = 9.1%). Exclusion is explicit (`excluded` column). `window` flags 7d vs 5d. Raw daily APY kept in apy_1d.-- @version 11with vaults as (select 0xbeeffeA75cFC4128ebe10C8D7aE22016D215060D as vault, 'Monad' as labelunion allselect 0xbEeFf89ABb7815cCD5182BD1FF82C4a4F8FCb13D, 'Ethereum'), raw_logs as (select block_time, contract_address, datafrom monad.logswhere contract_address = 0xbeeffeA75cFC4128ebe10C8D7aE22016D215060Dand topic0 in (0xdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7, 0xfbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db)and block_time >= now() - interval '100' dayunion allselect block_time, contract_address, datafrom ethereum.logswhere contract_address = 0xbEeFf89ABb7815cCD5182BD1FF82C4a4F8FCb13Dand topic0 in (0xdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7, 0xfbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db)and block_time >= now() - interval '100' day), events as (selectv.label, date_trunc('day', l.block_time) as day, l.block_time, bytearray_to_uint256(bytearray_substring(l.data, 1, 32)) / 1e6 as assets, bytearray_to_uint256(bytearray_substring(l.data, 33, 32)) / 1e18 as sharesfrom raw_logs ljoin vaults v on v.vault = l.contract_address), daily_last as (select label, day, assets / shares as share_pricefrom (select *, row_number() over (partition by label, day order by block_time desc) as rnfrom eventswhere shares > 0 and assets > 0)where rn = 1), days as (select v.label, cast(d.day as timestamp) as dayfrom vaults vcross join unnest(sequence(cast(date_trunc('day', now() - interval '100' day) as timestamp)