GLAMIDL Reference

deposit_strategy

Deposit principal into a direct lender strategy.

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 DepositStrategy as the delegate permission for this instruction.
  • strategy must be tracked in the vault's registered-position registry.
  • principal_mint must be present in the Loopscale deposit allowlist.
  • market_information must be present in the Loopscale markets allowlist.

Accounts

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

AccountRoleDescription
bs_authsignerFixed program or sysvar account.
strategywritableExternal strategy account.
market_informationread-onlyLoopscale market information account for the strategy, collateral, or principal asset.
principal_mintread-onlyToken mint account.
lender_tawritableLender token account used by Loopscale strategy deposit and withdrawal flows.
strategy_tawritableExternal strategy account.
associated_token_programread-onlyStandard Solana program account.
token_programread-onlyToken program (SPL Token or Token-2022) used by the strategy's principal mint during deposit.
event_authorityread-onlyAnchor event authority PDA used when the invoked program emits events.

Arguments

ArgumentTypeNotes
amountu64Principal amount to deposit into the Loopscale strategy.

Policy & permissions

  • Enable the Loopscale integration program on the vault integration ACL before Loopscale position actions.
  • Delegate permission: DepositStrategy.

Cross-instruction constraints

  • The Loopscale strategy must be tracked in the vault's registered positions when required by policy.