Kamino IntegrationProduction
lending_liquidate_obligation_and_redeem_reserve_collateral_v2
Liquidates a Kamino obligation and redeems reserve collateral through the GLAM integration.
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. |
| obligation | writable | Kamino lending obligation account. |
| lending_market | read-only | Kamino lending market account for the reserves and obligations touched by this instruction. |
| lending_market_authority | read-only | Kamino market authority PDA that authorizes reserve and obligation operations. |
| repay_reserve | writable | Kamino reserve account. |
| repay_reserve_liquidity_mint | read-only | Token mint account used or validated by this instruction. |
| repay_reserve_liquidity_supply | writable | Kamino reserve account. |
| withdraw_reserve | writable | Kamino reserve account. |
| withdraw_reserve_liquidity_mint | read-only | Token mint account used or validated by this instruction. |
| withdraw_reserve_collateral_mint | writable | Token mint account used or validated by this instruction. |
| withdraw_reserve_collateral_supply | writable | Kamino reserve account. |
| withdraw_reserve_liquidity_supply | writable | Kamino reserve account. |
| withdraw_reserve_liquidity_fee_receiver | writable | Kamino reserve account. |
| user_source_liquidity | writable | Vault-owned token account that supplies liquidity for Kamino deposit, repay, or liquidation flows. |
| user_destination_collateral | writable | Vault-owned collateral token account receiving Kamino collateral during liquidation. |
| user_destination_liquidity | writable | Vault-owned token account that receives liquidity borrowed or withdrawn from Kamino. |
| collateral_token_program | read-only | Token program account. |
| repay_liquidity_token_program | read-only | Token program account. |
| withdraw_liquidity_token_program | read-only | Token program account. |
| instruction_sysvar_account | read-only | Solana sysvar account. |
| collateral_obligation_farm_user_state | writable, optional | Kamino lending obligation account. |
| collateral_reserve_farm_state | writable, optional | Kamino reserve account. |
| debt_obligation_farm_user_state | writable, optional | Kamino lending obligation account. |
| debt_reserve_farm_state | writable, optional | Kamino reserve account. |
| farms_program | read-only | Kamino farm account. |
Arguments
| Argument | Type | Notes |
|---|---|---|
| liquidity_amount | u64 | |
| min_acceptable_received_liquidity_amount | u64 | |
| max_allowed_ltv_override_percent | u64 |
Policy & permissions
- Signer must hold Kamino Lending
Liquidate. - Lending policy and market allowlist are checked.
- Output collateral mint must be a vault asset, or otherwise configured as borrowable or priced.
Cross-instruction constraints
- Kamino user metadata and the relevant obligation accounts must exist before lending movement instructions run.