Kamino IntegrationProduction
vaults_withdraw
Withdraws shares or assets from a Kamino vault back to 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.
Accounts
| Account | Role | Description |
|---|---|---|
| glam_state | writable | GLAM state account that stores vault configuration, integration ACLs, delegate permissions, policies, assets, mint linkage, and pricing records. |
| glam_vault | writable | Vault PDA associated with the GLAM state and used as the vault authority. |
| glam_signer | signer, writable | Calling authority or fee payer. |
| integration_authority | read-only | Program-derived authority used by the integration for downstream invocation. |
| cpi_program | read-only | Downstream program invoked by this instruction. |
| glam_protocol_program | read-only | GLAM Protocol program account used for authorization or CPI. |
| system_program | read-only | Solana System Program. |
| withdraw_from_available_vault_state | writable | Vault or downstream vault account. |
| withdraw_from_available_global_config | read-only | withdraw from available global config account read by Kamino Integration's vaults withdraw instruction. |
| withdraw_from_available_token_vault | writable | Vault or downstream vault account. |
| withdraw_from_available_base_vault_authority | read-only | Vault or downstream vault account. |
| withdraw_from_available_user_token_ata | writable | Token account read or written by this instruction. |
| withdraw_from_available_token_mint | writable | Token mint account used or validated by this instruction. |
| withdraw_from_available_user_shares_ata | writable | Token account read or written by this instruction. |
| withdraw_from_available_shares_mint | writable | Token mint account used or validated by this instruction. |
| withdraw_from_available_token_program | read-only | Token program account. |
| withdraw_from_available_shares_token_program | read-only | Token program account. |
| withdraw_from_available_klend_program | read-only | withdraw from available Kamino Lending program account invoked or checked by this instruction. |
| withdraw_from_available_event_authority | read-only | Event authority or downstream event account. |
| withdraw_from_available_program | read-only | withdraw from available program account invoked or checked by this instruction. |
| withdraw_from_reserve_vault_state | writable | Vault or downstream vault account. |
| withdraw_from_reserve_reserve | writable | Kamino reserve account. |
| withdraw_from_reserve_ctoken_vault | writable | Vault or downstream vault account. |
| withdraw_from_reserve_lending_market | read-only | Kamino reserve account. |
| withdraw_from_reserve_lending_market_authority | read-only | Kamino reserve account. |
| withdraw_from_reserve_reserve_liquidity_supply | writable | Kamino reserve account. |
| withdraw_from_reserve_reserve_collateral_mint | writable | Token mint account used or validated by this instruction. |
| withdraw_from_reserve_reserve_collateral_token_program | read-only | Token program account. |
| withdraw_from_reserve_instruction_sysvar_account | read-only | Solana sysvar account. |
| event_authority | read-only | Event authority or downstream event account. |
| program | read-only | Anchor program account used by the downstream protocol. |
Arguments
| Argument | Type | Notes |
|---|---|---|
| shares_amount | u64 |
Policy & permissions
- Enable
KaminoVaultson the vault integration ACL. - Delegate permission: Kamino Vaults
Withdraw.
TypeScript SDK usage
await glamClient.kaminoVaults.withdraw(
kaminoVault,
new BN(500_000_000),
);Cross-instruction constraints
- The target Kamino vault must be allowed by the Kamino vaults policy before deposit or withdrawal.