GLAMIDL Reference

GLAM IDL Reference

A searchable reference of every instruction in the GLAM Protocol family.

Global context

GLAM is a modular Solana program architecture for programmable vaults, tokenized vault shares, external integrations, and policy enforcement. GLAM Protocol is the core program: it owns the state account, derives the vault account from the state account, records access control, stores vault-level policies, and authorizes vault-signed actions. Readers who want the underlying Solana model for deterministic program-controlled accounts can refer to the official Program Derived Addresses documentation.

GLAM Mint manages Token-2022 share mints, subscription and redemption flows, fee logic, request queues, escrows, and pricing validation for tokenized vaults. Token-2022 behavior such as extensions, transfer hooks, and default account state is documented by Solana in the official Token-2022 extensions documentation. Integration programs connect a GLAM vault to external protocols while preserving GLAM-level authorization. GLAM Config stores protocol-wide configuration, and GLAM Policies provides Token-2022 transfer-hook policy checks.

Account ownership and purpose:

This document covers 15 programs and 209 instructions. The table below summarizes the persistent accounts each program owns or controls. It intentionally describes account purpose rather than raw PDA seed arrays.

ProgramProgram IDAccounts owned or controlled
GLAM ProtocolGLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEzState account, Vault PDA, Anchor event authority
GLAM MintGM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGhTokenized vault mint, Request queue PDA, Escrow PDA, Anchor event authority
CCTP IntegrationG1NTcMDYgNLpDwgnrpSZvoSKQuR9NXG7S3DmtNQCDmrKIntegration authority PDA, Anchor event authority
Kamino IntegrationG1NTkDEUR3pkEqGCKZtmtmVzCUEdYa86pezHkwYbLydeIntegration authority PDA, Kamino user, obligation, farm, and vault accounts
SPL IntegrationG1NTsQ36mjPe89HtPYqxKsjY5HmYsDR6CbD2gd2U2ptaIntegration authority PDA
GLAM ConfiggConFzxKL9USmwTdJoeQJvfKmqhJ2CyUaXTyQ8v9TGXGlobal config PDA, Asset metadata records
GLAM Policies (Token Hook)po1iCYakK3gHCLbuju4wGzFowTMpAJxkqK1iwUqMonYPolicy account, Extra account metas PDA
GLAM Protocol StaginggstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHzState account, Vault PDA, Anchor event authority
GLAM Mint Staginggstgm1M39mhgnvgyScGUDRwNn5kNVSd97hTtyow1Et5Tokenized vault mint, Request queue PDA, Escrow PDA, Token ACL gate accounts, Anchor event authority
Kamino Integration StaginggstgKa2Gq9wf5hM3DFWx1TvUrGYzDYszyFGq3XBY9UqIntegration authority PDA, Kamino user, obligation, farm, and vault accounts
SPL Integration Staginggstgs9nJgX8PmRHWAAEP9H7xT3ZkaPWSGPYbj3mXdTaIntegration authority PDA
Bridge Integration StaginggstgxS9yTioViNKdsM4DC33k1TU9un2VCYDQK8fAeSABridge registry PDA, LayerZero OFT route records, Managed transfer records
External Positions Integration Staginggstge5RzNEGQwpwBPKTJbP9yczoFEzzm5upSSsie9fXExternal position registry data, Observation state PDA
Loopscale Integration StaginggstgL6y4uWjsfM3Qjs5euoTDmEcXoUjqx8rkYJhYngGLoopscale strategy accounts, Loopscale loan accounts
Neutral Trade Integration StaginggstgNyHgtURH7iuMn19GQczzv6Wc9fhPV2WDySZVyKxNeutral user bundle account

Policies and access control:

Access control has three layers that must be read together:

  1. The vault owner has all rights on the vault, but only for functionality enabled at the vault level.
  2. Integrations are opt-in. A Kamino, SPL, CCTP, Bridge, External Positions, Loopscale, or Neutral Trade instruction requires the corresponding integration to be enabled on the vault before it can run.
  3. Delegates start with no rights. Adding a delegate only registers an address; the owner must explicitly grant protocol-specific permissions before that delegate can act.

The recommended operating pattern is for the owner to be a multisig, such as Squads, with timelocks enabled for sensitive changes. Timelocks make policy, fee, integration, and access-control changes visible before they take effect. Emergency access updates are intended for narrow response actions such as disabling a compromised delegate or integration.

Policies apply even when the signer is the owner. Vault policies cover asset allowlists, borrowable assets, transfer destinations, and timelocks. Mint policies cover capacity, minimum subscription and redemption amounts, allowlists, blocklists, lockups, and fulfillment rules. Integration policies add protocol-specific restrictions such as slippage limits, market allowlists, borrow allowlists, vault allowlists, destination allowlists, route limits, and bundle allowlists.

Pricing atomicity:

All pricing instructions for a given pricing operation must be included in the same Solana transaction.

Splitting pricing instructions across multiple transactions is not supported and will produce incorrect or rejected NAV calculations. Pricing writes per-protocol valuation records into the GLAM state. Subscription fulfillment, redemption fulfillment, fee crystallization, and AUM validation rely on those records being fresh and internally consistent for the same operation.

Big Seven account pattern

Most integration instructions share a standard account pattern before the destination protocol's own accounts appear. This common prefix gives GLAM enough information to authorize the action, prove the vault authority, and invoke the external program. The destination-program accounts then mirror that protocol's instruction requirements one-for-one; GLAM validates the accounts it needs, adds any policy-specific data or checks, and forwards the external protocol accounts through CPI.

#AccountPurpose
1StateGLAM state account owned by the core protocol program. It records owner, enabled integrations, delegate permissions, policies, assets, borrowable assets, timelocks, mint linkage, and pricing records.
2VaultVault PDA controlled by the core protocol program and derived conceptually from the state account. It acts as the vault authority for SOL, token accounts, and supported external positions.
3Signer / FeePayerOwner, authorized delegate, manager, or transaction fee payer. Delegates must hold the exact permission required by the instruction.
4Integration Authority PDAPDA controlled by the integration program for integration-level signing and authorization flows.
5Destination ProgramExternal program being invoked, such as Kamino, SPL Token, Circle CCTP, LayerZero, Loopscale, or Neutral Trade.
6GLAM Core Protocol ProgramCore program used by the integration to authorize vault-signed CPI and update GLAM state where required.
7System ProgramSolana System Program, required for account creation, SOL movement, rent handling, or PDA-related flows.

Programs

15 programs