Kamino IntegrationProduction
farms_harvest_reward
Harvests Kamino Farms rewards for a vault-owned farm position.
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. |
| user_state | writable | User position state account updated by the downstream protocol. |
| farm_state | writable | Kamino farm account. |
| global_config | read-only | global config account read by Kamino Integration's farms harvest reward instruction. |
| reward_mint | read-only | Token mint account used or validated by this instruction. |
| user_reward_ata | writable | Token account read or written by this instruction. |
| rewards_vault | writable | Vault or downstream vault account. |
| rewards_treasury_vault | writable | Vault or downstream vault account. |
| farm_vaults_authority | read-only | Vault or downstream vault account. |
| scope_prices | optional | Oracle or price account used for valuation or downstream validation. |
| token_program | read-only | Token program account. |
Arguments
| Argument | Type | Notes |
|---|---|---|
| reward_index | u64 |
Policy & permissions
- Enable
KaminoFarmson the vault integration ACL. - Delegate permission: Kamino Farms
HarvestReward.
TypeScript SDK usage
await glamClient.kaminoFarm.harvest([farmState]);Cross-instruction constraints
- The Kamino farm user state must be initialized before stake, unstake, withdrawal, or reward harvest flows.