Skip to content

WIP OToken Vault Oracles - #2953

Draft
naddison36 wants to merge 1 commit into
masterfrom
nicka/vault-oracle
Draft

WIP OToken Vault Oracles#2953
naddison36 wants to merge 1 commit into
masterfrom
nicka/vault-oracle

Conversation

@naddison36

@naddison36 naddison36 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds immutable Vault-backed price oracles for OETH, OUSD, and superOETHb.

Each oracle reports the value of one OToken in its Vault’s underlying asset:

price = vault.totalValue() * 1e18 / oToken.totalSupply();

Prices use 18 decimals and are exposed through:

  • price()
  • latestAnswer()
  • Chainlink-compatible latestRoundData()
  • Chainlink-compatible getRoundData(1)

The OToken address is resolved directly from the configured Vault to prevent mismatched Vault/token deployments.

Deployments

Ethereum Mainnet

Deployment Vault constructor argument Description
OETH_VAULT_ORACLE OETH_VAULT_PROXY (0x39254033945AA2E4809Cc2977E7087BEE48bd7Ab) OETH / WETH
OUSD_VAULT_ORACLE OUSD_VAULT_PROXY (0xE75D77B1865Ae93c7eaa3040B038D7aA7BC02F70) OUSD / USDC

Base

Deployment Vault constructor argument Description
OETHBASE_VAULT_ORACLE OETHBASE_VAULT_PROXY (0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93) superOETHb / WETH

The Foundry deployment scripts verify the Vault, OToken, description, decimals, version, and that the returned price is positive. No governance actions are required.

Behavior

  • Returns 1e18 when Vault value and OToken supply are equal.
  • Increases above 1e18 as unreleased yield accumulates between rebases.
  • Can return below 1e18 if the Vault becomes insolvent and its assets are worth less than the outstanding OToken supply.
  • Does not apply a price cap, floor, or peg adjustment.
  • Reports the raw ratio between the Vault’s assets and the OToken supply.
  • Supports OUSD’s 6-decimal USDC underlying because Vault.totalValue() is normalized to 18 decimals.
  • Reverts with No data present when OToken supply is zero.
  • Uses a synthetic Chainlink round ID of 1; the price is calculated live rather than historically stored.

Testing

Added concrete and fuzz coverage for:

  • Constructor configuration
  • Price at rebase
  • Accumulated yield and prices above one
  • Fractional prices
  • Zero supply
  • Chainlink-compatible accessors and metadata
  • Arbitrary total-value/total-supply ratios

Operational impact

The deployed oracle names and callable interface are not currently referenced by Talos actions. No curated action ABI, pinned address, or existing Hardhat deployment artifact requires updating in this PR.

Code Change Checklist

  • Contract code is complete
  • Executable Foundry deployment files
  • Fork verification after deployment
  • Unit and fuzz tests
  • Owner full checklist review
  • Two internal approvals

@naddison36
naddison36 marked this pull request as draft July 29, 2026 11:46
@naddison36 naddison36 changed the title OToken Vault Oracles WIP OToken Vault Oracles Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant