Skip to main content

createWrapperManagerUpdatePositionInstruction

Updates strategy position entries on the vault via self-CPI using the vault’s signer seeds. This instruction enforces that the vault has zero AUM (empty vault only), ensuring the position configuration is set before any deposits are accepted. Used to add or remove strategy positions that define where the vault can allocate capital.

Usage

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

const ix = createWrapperManagerUpdatePositionInstruction(
  {
    manager: managerKeypair.publicKey,
    vault: vaultAddress,
    exponentPrices: exponentPricesAddress,
    systemProgram: SystemProgram.programId,
  },
  {
    update: {
      addPosition: {
        strategyAddress: kaminoStrategyAddress,
        tokenEntryIndex: 0,
        positionType: { kamino: {} },
      },
    },
  }
);

Accounts

NameSignerWritableDescription
managerYesYesVault manager updating the positions
vaultNoYesVault account (must have zero AUM)
exponentPricesNoYesExponentPrices account for token valuations
systemProgramNoNoSystem program

Args

NameTypeDescription
updatePositionUpdatePosition update action (add or remove a strategy position entry)

Returns

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