GLAMIDL Reference

request_withdrawal

Request a Neutral bundle withdrawal for the GLAM vault.

Required conditions

  • The vault integration ACL must enable this integration before the instruction is accepted; that enablement is defined on the GLAM state account.
  • If the signer is not the owner, the delegate ACL on the GLAM state must contain the exact protocol permission required by this instruction; registering a delegate alone is insufficient.
  • Instruction-specific destination accounts must satisfy the external protocol's own account model; GLAM validates the accounts it needs for authorization and policy enforcement, then passes the remaining protocol accounts through CPI.
  • The instruction metadata names RequestWithdrawal as the delegate permission for this instruction.
  • bundle_account must be present in the Neutral bundles allowlist.

Accounts

Uses the standard Big Seven account pattern, plus the instruction-specific accounts below.

AccountRoleDescription
user_bundle_accountwritableNeutral user bundle account that tracks this vault's bundle deposit or withdrawal requests.
bundle_accountwritableNeutral bundle account for the asset bundle being deposited into or withdrawn from.
oracle_datawritablePricing or oracle account used to calculate value for the instruction.
bundle_temp_datawritableToken account read or written by the instruction.
token_programread-onlyToken program owning the bundle asset's mint and associated token accounts for the withdrawal request.
rentread-onlyFixed program or sysvar account.

Arguments

ArgumentTypeNotes
shares_amountu128Neutral bundle share amount requested for withdrawal.
min_estimated_valueu64Minimum estimated value the withdrawal must return for the request to be acceptable.

Policy & permissions

  • Enable the Neutral integration program on the vault integration ACL before Neutral bundle actions.
  • Delegate permission: RequestWithdrawal.

Cross-instruction constraints

  • The Neutral bundle depositor account must be initialized and the bundle must remain allowlisted.