Skip to main content

createManagerUpdatePositionInstruction

Builds a raw instruction to update the vault’s strategy position entries. Managers use this to register or deregister orderbook offers, token accounts, and Kamino obligations that the vault tracks as part of its investment strategy. Position updates affect AUM calculations and withdrawal routing.

Usage

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

const ix = createManagerUpdatePositionInstruction(
  {
    manager: wallet.publicKey,
    vault: vaultAddress,
    exponentPrices: exponentPricesPda,
    systemProgram: SYSTEM_PROGRAM_ID,
  },
  {
    update: {
      registerOrderbookOffer: {
        orderbook: orderbookAddress,
        offerIdx: 0,
      },
    },
  }
);

Accounts

NameSignerWritableDescription
managerYesYesThe vault manager authority
vaultNoYesThe Strategy Vault account
exponentPricesNoYesGlobal ExponentPrices account
systemProgramNoNoSystem program

Args

NameTypeDescription
updatePositionUpdateThe position change to apply (register/deregister offers, token accounts, or obligations)

Returns

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