GLAMIDL Reference

request_deposit

Request a Neutral bundle deposit from the GLAM vault's token account.

Handler narrative

  1. Load the GLAM state or program account required by the instruction and verify the signer.
  2. Verify that the integration is enabled on the vault and that the caller has the required delegate permission or owner authority.
  3. Validate the instruction-specific policy, then invoke the external protocol with the vault authority where required.
  4. Request a Neutral bundle deposit from the GLAM vault's token account. - Permission requirement: RequestDeposit. - Policy: bundle_account must be present in NeutralPolicy::bundles_allowlist.

Required conditions

  • The submitted accounts must match the declared account list, signer requirements, writable requirements, fixed program addresses, and account relationships shown below.
  • The GLAM state account is the source of truth for owner, enabled integrations, delegate permissions, policies, assets, borrowable assets, timelock settings, mint linkage, and pricing records.
  • The vault account must be the PDA controlled by the core protocol program and derived conceptually from the state account; instructions use it as the vault authority for SOL, token accounts, and external positions.
  • 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 RequestDeposit as the delegate permission for this instruction.
  • Additional policy conditions documented for this instruction: Policy: bundle_account must be present in NeutralPolicy::bundles_allowlist.

Accounts

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

AccountRoleDescription
user_token_accountwritableToken account read or written by the instruction.
pending_deposit_token_accountwritableToken account read or written by the instruction.
treasury_accountwritableInstruction-specific account supplied by the caller or SDK.
user_bundle_accountwritableInstruction-specific account supplied by the caller or SDK.
asset_addresswritableInstruction-specific account supplied by the caller or SDK.
oracle_datawritablePricing or oracle account used to calculate value for the instruction.
bundle_temp_datawritableToken account read or written by the instruction.
bundle_accountwritableInstruction-specific account supplied by the caller or SDK.
pending_bundle_asset_authoritywritableInstruction-specific account supplied by the caller or SDK.

Arguments

ArgumentTypeNotes
amountu64Token amount requested for deposit into the Neutral bundle.

Policy & permissions

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

Cross-instruction constraints

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