Skip to main content
Follow the steps in the CLI introduction to install the GLAM CLI.
All transactions mentioned on this page were executed on mainnet using GLAM CLI v1.0.2. There might be some differences in the most recent versions. Check help messages first if you encounter any issues.

Preparation

Before starting, ensure you have:
  • Solana keypairs for each persona. Create new keypairs with solana-keygen new -o keypair.json. See Solana CLI docs for more details.
  • SOL in each account for transaction fees.
  • USDC for the user account to subscribe to the vault.
  • Jupiter API key (optional but recommended). Required for commands that fetch token prices (e.g., vault token-balances). Get one for free on Jupiter Developer Platform.

Setup

In this quickstart, there are three personas:
  • Vault owner: creates a vault, configures it, and grants the delegate proper permissions for operations.
    • HQsXBSrJait1Gt8FJSNhf87p8cddRAy4WEbGzQvdeC3M
    • Funded with 0.1 SOL
  • Delegate: allocates fund, and fulfills user requests.
    • ndcXmTFuMPkJ5mE4sYNnZdSo99Ajzny88xnrids4QnG
    • Funded with 0.01 SOL
  • User: subscribes to the vault, then redeems shares.
    • gpoPk9Aa7yZoFsfkAUiaH85UsdDvoFz8gZrTGbjtAX8
    • Funded with 0.01 SOL plus 5 USDC
Prepare CLI configs for each persona:
owner-config.json
manager-config.json
user-config.json
For convenience, place all user config files, as well as vault setup tokenized.json (see below) in the same directory. All commands, unless specified otherwise, are run from this directory.

Create a Tokenized Vault

Vault setup:
tokenized.json
The vault setup format may change between CLI versions. See the templates directory for the most up-to-date examples.

Enable Kamino Vaults

Kamino Vaults needs to be enabled before it can be used.

Grant Delegate Permissions

Refer to Integrations and Delegated Accounts for more details on protocols and permissions.
Vault owner grants the delegate the following permissions:
  • Fulfill permission from GlamMint so it can fulfill user requests.
  • Deposit and Withdraw permissions from KaminoVaults so it can deploy GLAM vault assets to Kamino vaults.

Subscribe to GLAM Vault

Set the active GLAM vault to user’s CLI config:
User subscribes to GLAM vault with 5 USDC:
We’ve configured the vault with 0 fees, so user receives 5 shares (initial share price is 1 USDC).

Allocate Idle Capital

User deposited 5 USDC has arrived in the GLAM vault, held by vault PDA. Now the delegate can allocate idle capital to a Kamino vault to start generating yield. Set the active GLAM vault to delegate’s CLI config:
Display vault token balances:
Output:
Deposit to Kamino vault USDC Prime:
Withdraw from Kamino vault USDC Prime:

Redeem GLAM Vault Shares

User holds 5 GLAM vault shares, and redeems 2 shares to get back USDC. Redemption request is queued, and withdrawal amount can be claimed after the request is fulfilled.

Fulfill Redemption

The delegate has been granted Fulfill permission from GlamMint, so it can fulfill user requests.

Claim from Redemption

User claims USDC from fulfilled redemption.