rwa-yield: fix USDY probe (OndoOracle read, no more bridge-burn false negative) - #1369
Merged
Merged
Conversation
USDY totalSupply on Ethereum was SHRINKING (bridge burns to Solana outpacing rebase mints), producing false negative delivered yield (~-9%). Replace naked totalSupply delta with OndoOracle.getAssetPrice read - same oracle already used by OUSG (Aave IPriceOracle). Now: 349 bps delivered vs 355 promised = -6 bps deviation. Independent of any bridge / subscription flow. Extracts blockOffsetBySeconds + annualizedYieldBps + totalSupply selector to common.go for reuse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the -9% USDY row on bench 089.
Before: totalSupply(now) - totalSupply(30d) → negative because ETH-side supply shrinks as holders migrate to Solana. Yield = -901 bps.
After: OndoOracle.getAssetPrice(USDY) → oracle NAV grows monotonically with rebase, independent of bridge/subscription flow. Yield = 349 bps.
Uses the same OndoOracle contract (`0x9Cad45a8BF0Ed41Ff33074449B357C7a1fAb4094`) and same helper (`readAavePriceOracleNAV`) already used by OUSG. USDY is registered there.
Live from VPS
Full cohort now tracks within ±20 bps. Bench 089 is presentable.
Also refactors 3 shared helpers (`blockOffsetBySeconds`, `annualizedYieldBps`, `erc20TotalSupplySelector`) from usdy.go into common.go for reuse.