Skip to main content
Use the Kamino Manager CLI to create lending markets, add reserves, and configure market parameters.
Before starting, complete the Installation & Setup guide.

Understanding CLI Modes

All Kamino Manager commands support different execution modes to test and verify operations before committing them:
  • inspect - Preview the transaction without executing it
  • simulate - Test the transaction simulation on-chain
  • execute - Execute the transaction immediately
  • multisig - Generate a multisig proposal for the operation
It’s recommended to always start with inspect or simulate mode to verify transactions before running with execute.

Create a New Market

Create a new Kamino lending market to start accepting deposits and loans.
1

Create Market

Run the create market command to initialize a new lending market.
yarn kamino-manager create-market --mode execute
For testing purposes, add the --staging flag to use the staging program ID instead of mainnet.
2

Save Market Address

After creation, save the market address from the command output. This address is required for all subsequent operations.The market address will be displayed in the terminal output after successful creation.

Add Reserves to Market

Add token reserves to the market to enable lending and borrowing for specific assets.

Reserve Configuration

Create a reserve configuration JSON file that defines the parameters for the reserve. Key configuration fields include:
  • Loan-to-Value (LTV) - Maximum borrowing capacity against collateral
  • Liquidation Threshold - Point at which positions can be liquidated
  • Borrow Rate Curve - Interest rate based on utilization
  • Fees - Borrow and flash loan fees
  • Deposit/Borrow Limits - Maximum capacity for the reserve
{
  "status": 0,
  "loanToValuePct": 65,
  "liquidationThresholdPct": 75,
  "minLiquidationBonusBps": 500,
  "maxLiquidationBonusBps": 1000,
  "badDebtLiquidationBonusBps": 99,
  "protocolLiquidationFeePct": 0,
  "protocolTakeRatePct": 0,
  "assetTier": 0,
  "fees": {
    "borrowFee": "0",
    "flashLoanFee": "0"
  },
  "depositLimit": "6000000000000000",
  "borrowLimit": "5400000000000000",
  "tokenInfo": {
    "name": "SOL",
    "scopePriceChain": [],
    "switchboardPriceAggregator": "",
    "pythPrice": "",
    "maxAgeSecs": 100,
    "maxDivergenceBps": 250
  },
  "borrowRateCurve": {
    "points": [
      { "utilizationRateBps": 0, "borrowRateBps": 0 },
      { "utilizationRateBps": 7000, "borrowRateBps": 500 },
      { "utilizationRateBps": 8500, "borrowRateBps": 1000 },
      { "utilizationRateBps": 10000, "borrowRateBps": 5000 }
    ]
  }
}
View Reserve Config Example

Add Reserve to Market

1

Add Asset to Market

Use the add-asset-to-market command with the market address, token mint, and configuration file.
yarn kamino-manager add-asset-to-market \
  --market <MARKET_ADDRESS> \
  --mint <TOKEN_MINT> \
  --mint-program-id TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA \
  --reserve-config ./configs/my_reserve_config.json \
  --mode execute
The mint-program-id shown above is the standard SPL Token program ID. Use this for most tokens unless working with Token-2022 extensions.
2

Verify Reserve

Check the Solana Explorer to verify the reserve was created successfully. The transaction signature can be found in the command output.

Manage Reserve Configuration

Update and maintain reserve configurations as market conditions change.

Download Reserve Configuration

Download the current configuration for an existing reserve to review or modify it.
yarn kamino-manager download-reserve-config \
  --market <MARKET_ADDRESS> \
  --reserve <RESERVE_ADDRESS> \
  --output ./configs/reserve_config.json \
  --mode inspect

Update Reserve Configuration

Apply changes to a reserve by updating its configuration file.
yarn kamino-manager update-reserve-config \
  --market <MARKET_ADDRESS> \
  --reserve <RESERVE_ADDRESS> \
  --reserve-config ./configs/updated_reserve_config.json \
  --mode execute
You can choose between full replacement of the configuration or differential updates that only change specific fields. Check the command help for update options.

View Reserve Details

Get detailed information about a specific reserve including current utilization, rates, and TVL.
yarn kamino-manager get-reserve-data \
  --market <MARKET_ADDRESS> \
  --reserve <RESERVE_ADDRESS>

Get Oracle Mappings

Retrieve Scope oracle mappings needed for configuring a reserve’s price feed. Oracles (Scope, Pyth, Switchboard) provide price data for tokens, and this command helps get the correct oracle IDs for the reserve config’s tokenInfo section.
yarn kamino-manager get-oracle-mappings

Market Configuration

Manage market-wide settings and retrieve complete market data.

Download Market Configuration

Export the current market configuration for review or backup.
yarn kamino-manager download-lending-market-config \
  --lending-market <MARKET_ADDRESS> \
  --staging
The config is automatically saved to ./configs/{MARKET_ADDRESS}/market-{MARKET_ADDRESS}.json Parameters:
  • lending-market - Address to download the lending market config for
  • staging - Boolean flag. If set, staging programs will be used

Download Market with All Reserves

Download a lending market configuration together with all associated reserves in one command.
yarn kamino-manager download-lending-market-config-and-all-reserves-configs \
  --lending-market <MARKET_ADDRESS> \
  --staging
  • lending-market - Address to download the lending market config for
  • staging - Boolean flag. If set, staging programs will be used

Update Market Settings

Apply changes to market-level parameters.
yarn kamino-manager update-lending-market-from-config \
  --lending-market <MARKET_ADDRESS> \
  --lending-market-config-path ./configs/lending_market_address/market-lending_market_address.json \
  --mode inspect \
  --staging
Use --mode inspect to preview changes before executing. Change to --mode execute when ready to apply updates.

Get Complete Market Data

Retrieve all market information including all reserves in a single command.
yarn kamino-manager get-market-data \
  --market <MARKET_ADDRESS>
This command provides a comprehensive view of the market including TVL, all reserves, and current market state.

Advanced Operations

Transfer Market Ownership

Transfer market ownership from an admin wallet to a multisig account for enhanced security.
All markets should be owned by a multisig once they are publicly used and maintained. While preparing configurations and adding reserves is faster with a hot wallet, production markets must be transferred to multisig ownership for security.
1

Set New Owner

Update the lending_market_owner_cached field in the market configuration to the new admin address (typically a multisig).
yarn kamino-manager update-market-config \
  --market <MARKET_ADDRESS> \
  --market-config ./configs/market_with_new_owner.json \
  --mode execute
2

Finalize Transfer

Complete the ownership transfer by setting the market owner to the new admin (cached address).
yarn kamino-manager update-lending-market-owner \
  --lending-market <MARKET_ADDRESS> \
  --mode execute
This command can only be executed by the current lending_market_owner_cached and will set the lending_market_owner to that cached address. When migrating from a hot wallet to multisig, this finalizes the ownership transfer.
Ensure the new owner address is correct before transferring. Loss of market ownership cannot be easily reversed.

Multisig Operations

Generate multisig proposals for operations that require multiple signers.
We recommend using Squads with a hardware wallet for multisig management. Create a new Squad by providing team member wallets and a signature threshold, then use the Squad address as the market owner.
Use the --mode multisig flag with any command to create a proposal instead of executing directly.
yarn kamino-manager update-reserve-config \
  --market <MARKET_ADDRESS> \
  --reserve <RESERVE_ADDRESS> \
  --reserve-config ./configs/config.json \
  --mode multisig
This generates a transaction that can be signed by multiple parties through a multisig wallet like Squads.

Next Steps