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
owner-config.json
manager-config.json
user-config.json
tokenized.json (see below) in the same directory. All commands, unless specified otherwise, are run from this directory.
Create a Tokenized Vault
- Transaction
- Vault State: 3ciXL6K3kxF754sjqP5acHYHjhZWNK6rj6svjrYouNpY
- Vault PDA: 9hcpVEWDe55hHDHkk4SbN4AVnqqWYXUE7EW3cjai4JAE
- Mint PDA: J6wov8kN6tw48u57JBKszD4Vn4hmx32bHxHK82ZvrXDe
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.
Fulfillpermission fromGlamMintso it can fulfill user requests.DepositandWithdrawpermissions fromKaminoVaultsso it can deploy GLAM vault assets to Kamino vaults.
Subscribe to GLAM Vault
Set the active GLAM vault to user’s CLI config: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: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 grantedFulfill permission from GlamMint, so it can fulfill user requests.