GLAMIDL Reference

lending_init_obligation_farms_for_reserve

Initializes Kamino farm state associated with a lending obligation and reserve.

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

AccountRoleDescription
glam_statewritableGLAM state account that stores vault configuration, integration ACLs, delegate permissions, policies, assets, mint linkage, and pricing records.
glam_vaultwritableVault PDA associated with the GLAM state and used as the vault authority.
glam_signersigner, writableCalling authority or fee payer.
integration_authorityread-onlyProgram-derived authority used by the integration for downstream invocation.
cpi_programread-onlyDownstream program invoked by this instruction.
glam_protocol_programread-onlyGLAM Protocol program account used for authorization or CPI.
payersigner, writableFee payer funding rent or account allocation for this instruction.
obligationwritableKamino lending obligation account.
lending_market_authorityread-onlyKamino market authority PDA that authorizes reserve and obligation operations.
reservewritableKamino reserve account.
reserve_farm_statewritableKamino reserve account.
obligation_farmwritableKamino lending obligation account.
lending_marketread-onlyKamino lending market account for the reserves and obligations touched by this instruction.
farms_programread-onlyKamino farm account.
rentread-onlySolana sysvar account.
system_programread-onlySolana System Program.

Arguments

ArgumentTypeNotes
modeu8

Policy & permissions

  • Enable KaminoLend on the vault integration ACL.
  • Delegate permission: Kamino Lending Init with farm setup context.