Skip to main content

Documentation Index

Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt

Use this file to discover all available pages before exploring further.

createUpdatePriceInstruction

Updates price values in the ExponentPrices account from oracle sources. Can be called by anyone since price data comes from verified oracle feeds — the instruction validates each update against the configured oracle for that price entry. Typically called before operations that depend on accurate token valuations, such as deposits, withdrawals, or AUM recalculations.

Usage

import { createUpdatePriceInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
import { PublicKey } from "@solana/web3.js";

const ix = createUpdatePriceInstruction(
  {
    exponentPrices: exponentPricesAddress,
  },
  {
    updates: [
      {
        mint: usdcMint,
        price: BigInt(1_000_000),
        confidence: BigInt(1_000),
      },
      {
        mint: solMint,
        price: BigInt(150_000_000),
        confidence: BigInt(50_000),
      },
    ],
  }
);

Accounts

NameSignerWritableDescription
exponentPricesNoYesExponentPrices account to update

Args

NameTypeDescription
updatesUpdatePriceInput[]Array of price updates with new values for each token

Returns

TransactionInstruction — a transaction instruction ready to be added to a transaction.