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.

createRecalculateAumInstruction

Recalculates the vault’s assets under management by reading balance accounts and current price data. This instruction is typically called as a post-hook after Squads policy execution to verify that the transaction outcome is within expected bounds. Can be called by anyone since it only reads balance data and updates the vault’s cached AUM value.

Usage

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

const ix = createRecalculateAumInstruction(
  {
    exponentVaultsProgram: EXPONENT_VAULTS_PROGRAM_ID,
    vault: vaultAddress,
    exponentPrices: exponentPricesAddress,
  },
  {
    instructions: compiledInstructions,
  }
);

Accounts

NameSignerWritableDescription
exponentVaultsProgramNoNoExponent Vaults program
vaultNoYesVault account to recalculate AUM for
exponentPricesNoNoExponentPrices account for token valuations

Args

NameTypeDescription
instructionsHookCompiledInstruction[]Compiled instructions from the sync transaction used for outcome verification

Returns

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