Skip to main content
vanna_oracle — FXY5DRfekMUTbUp4uyCFpCZmCccrp6kPq3hTM4GRihnc The core never reads a price account itself. It sends the oracle a list of queries and accepts the answer only as return data from the program it called.

Instructions

Admin checks read the core’s ProtocolConfig, so the oracle has no admin of its own.

Queries and results

value is in nano-USD. Liabilities round up, collateral rounds down. borrow_value is the value used for borrowing decisions (for a debt off its TWAP, the higher of price and TWAP). checks is a bitmask of FRESH, TWAP_OK, CONFIDENCE_OK, TWAP_FRESH. open says whether a venue still holds exposure.

Source selection

For each token, get_price reads its OracleConfig from the price book:
  1. Kamino Scope (scope_prices + scope_chain): a price is the product of up to four OraclePrices entries (for example JitoSOL = stake rate × SOL/USD), stamped with its oldest entry. Used while fresh. A zero entry counts as unavailable.
  2. Pyth (pyth_price, × pyth_factor when set): the fallback when Scope is stale, used if it is newer. It is the only source when no Scope chain is set (JupUSD).
  3. Receipts (receipt_account owned by receipt_program): a Kamino reserve gives an exchange rate into the underlying; a Perena vault or tranche gives a USD share price; a basis vault gives a NAV per share the oracle computes itself.
The xStock Scope entries already apply the mint’s scaled-UI multiplier, so they price one raw token.

Checks

What each instruction requires:

Market book (Phoenix)

The market book lists the Phoenix markets Vanna accepts. Each entry holds the market (orderbook account), its Phoenix asset id, the leverage cap, a trading switch, and the index-price OracleConfig. The book’s collateral_price prices Phoenix collateral (phUSD at the USDC price). The validator reads the same book to enforce leverage caps and liquidation bands. See Phoenix Perps.

Accounts

The oracle segment in remaining_accounts is [vanna_oracle, price_book, …] followed by the price accounts of every token with a balance (a cToken’s klend reserve included), and for a held venue its market book, exchange, trader and the price accounts of each open market. Accounts are found by key, in any order.