You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: per-address yield for wrapped OTokens (wOETH/wOUSD/wsuperOETHb/wOS)
Wrapped OTokens are non-rebasing ERC4626 vaults, so per-holder yield accrues via
assetsPerShare rather than balance. Adds WOTokenAddressYield: a per-holder daily series
(value, cost basis, yield, roi) built by an ARM-style balance*dR checkpoint, emitted
automatically as a companion of the OToken factory whenever a wotoken param is set.
Extends the portfolio APY resolver to blend wrapped positions via the underlying
OToken's USD rate.
Design points worked out during development and folded in:
- from is the wrapped vault's first-deposit (genesis) block: the proxy ERC4626 reverts
on every view until initialized, so both the WOToken state snapshot and the yield
sweep skip it until live, keeping from robust to being set early.
- outflows clamp at zero (no phantom negatives); the daily sweep runs once per day
(latestBlockOfDay); restart re-hydration loads the previous-day baseline.
Validated on a real OETH backfill: value=balance*aps and cumulativeYield=value-cost hold
exactly against on-chain, zero negatives, correct across a mid-day restart.
0 commit comments