SIGN IN SIGN UP

origin-dollar: fix TVL, measure APY on-chain, fix underlyingTokens (#2892)

TVL was totalSupply x price, which counts the OUSD the vault's own Curve AMO
minted into the pool -- protocol-owned liquidity, not depositor funds. It runs
~11% above the backing that belongs to holders. It now reads Origin's
protocolDailyStatDetails.tvl, which is already net of it, converted out of the
row's ETH denomination through rateETH so a dollar product is not valued
through the ETH price.

APY is now measured on-chain from rebasingCreditsPerTokenHighres over 7d, via a
helper shared with the other origin-* adaptors (added here as
origin-ether/otokenApy.js -- identical to the copy in the origin-ether and
origin-sonic branches, so whichever lands first, the rest apply cleanly). The
squid's apy7DayAvg reads ~0.2pp low because it includes the in-progress day,
annualised over a full day regardless of how much of it has elapsed.

underlyingTokens listed USDT and DAI, which the vault no longer holds; USDC is
its only collateral asset today. An empty stats result previously threw a
TypeError on row.tvl -- it now returns no pool for that run. Smaller fixes:
apyBase rather than apy, and the pool url pointed at originprotocol.eth.limo
rather than the app route the live product page links to.
C
Chris committed
cc5c021e3c0c729d2ad8d82ba380a962df0dfc24
Parent: 7b0f73c
Committed by GitHub <noreply@github.com> on 8/8/2026, 6:50:28 AM