GLAMIDL Reference

crystallize_fees

Calculates and crystallizes time/performance fees for a tokenized vault.

Handler narrative

  1. Load the GLAM state or program account required by the instruction and verify the signer.
  2. Read current valuation and fee configuration, calculate accrued fees, then record or distribute fee shares according to policy.

Required conditions

  • The submitted accounts must match the declared account list, signer requirements, writable requirements, fixed program addresses, and account relationships shown below.
  • The GLAM state account is the source of truth for owner, enabled integrations, delegate permissions, policies, assets, borrowable assets, timelock settings, mint linkage, and pricing records.
  • Mint actions must satisfy the linked GLAM state, Token-2022 mint configuration, mint policy, and any request queue or escrow state involved in the flow.
  • The vault must have fresh pricing records for the operation; fee or fulfillment math depends on NAV values written by the pricing flow.

Accounts

AccountRoleDescription
glam_statewritableState account owned by the GLAM Protocol program; it records vault configuration, policies, and pricing records.
glam_escrowread-onlyProgram-derived account used by this instruction; clients should prefer SDK helpers when available.
glam_mintwritableToken-2022 mint associated with the GLAM mint or tokenized vault.
escrow_mint_atawritableToken mint account used by the instruction.
signersigner, writableCalling authority. It must be the owner or a delegate with the explicit permission required by this instruction.
glam_protocol_programread-onlyGLAM Protocol program account used for authorization or CPI.
token_2022_programread-onlyStandard Solana program account required by the instruction.

Arguments

No arguments.

Policy & permissions

  • No external integration enablement is required beyond the program-level functionality involved in this instruction.
  • Manager or protocol authority is required according to the mint and fee configuration.

TypeScript SDK usage

await glamClient.fees.crystallizeFees();

Cross-instruction constraints

  • Requires fresh pricing for the vault. The pricing operation itself must be atomic in a single transaction.