Swapper Deposit
swapperfinance/swapper-toolkit
Deposit and bridge funds into a wallet or protocol using Swapper Finance.
Complete guide for Kamino Finance - Solana's leading DeFi protocol for lending, borrowing, liquidity management, and leverage trading.
$ npx skills add sendaifun/skills --skill kamino -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sendaifun/skills kamino --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kamino .claude/skills/kamino && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "kamino" agent skill from https://github.com/sendaifun/skills/tree/main/skills/kamino into .claude/skills/kamino/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kamino", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sendaifun/skills/tree/main/skills/kaminoType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sendaifun/skills --skill kamino -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sendaifun/skills kamino --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/kamino .agents/skills/kamino && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "kamino" agent skill from https://github.com/sendaifun/skills/tree/main/skills/kamino into .agents/skills/kamino/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kamino", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sendaifun/skills --skill kamino -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sendaifun/skills kamino --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/kamino .cursor/skills/kamino && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "kamino" agent skill from https://github.com/sendaifun/skills/tree/main/skills/kamino into .cursor/skills/kamino/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kamino", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sendaifun/skills.git --path skills/kamino--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sendaifun/skills --skill kamino -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sendaifun/skills kamino --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/kamino .gemini/skills/kamino && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "kamino" agent skill from https://github.com/sendaifun/skills/tree/main/skills/kamino into .gemini/skills/kamino/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kamino", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sendaifun/skills kaminoInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sendaifun/skills --skill kamino -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/kamino .github/skills/kamino && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "kamino" agent skill from https://github.com/sendaifun/skills/tree/main/skills/kamino into .github/skills/kamino/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kamino", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sendaifun/skills --skill kamino -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sendaifun/skills kamino --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sendaifun/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/kamino .opencode/skills/kamino && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "kamino" agent skill from https://github.com/sendaifun/skills/tree/main/skills/kamino into .opencode/skills/kamino/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kamino", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
kaminoComplete guide for Kamino Finance - Solana's leading DeFi protocol for lending, borrowing, liquidity management, and leverage trading.
Kamino is an agent skill from sendaifun/skills. Complete guide for Kamino Finance - Solana's leading DeFi protocol for lending, borrowing, liquidity management, and leverage trading. Covers klend-sdk (lending), kliquidity-sdk (automated liquidity strategies), scope-sdk (oracle aggregator), multiply/leverage operations, vaults, and obligation orders.
Its SKILL.md is about 6.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files (for example `docs/troubleshooting.md`, `examples/lending/borrow-repay.md` and `examples/lending/deposit-withdraw.md`).
It sits in Business, Finance & HR, covering Banking and insurance, Crypto and DeFi analysis and Trading and backtesting. It works with Solana. The repository describes itself as: a public marketplace of all solana-related skills for agents to learn from! The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 06b36b8. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (TypeScript), which the agent can run.
Shell commands in SKILL.md call:
yarnnpmjqFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.mainnet-beta.solana.comAlso links to:
github.comkamino.financedocs.kamino.financediscord.ggFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Kamino loads about 6.8k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 464 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
# .env fileAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sendaifun/skills at commit 06b36b8, republished under its Apache-2.0 licence (© sendaifun). 464 words, ~6,810 tokens.
.claude/skills/kamino/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.Build sophisticated DeFi applications on Solana with Kamino Finance - the comprehensive DeFi protocol offering lending, borrowing, automated liquidity management, leverage trading, and oracle aggregation.
Kamino Finance provides:
# Lending SDK
npm install @kamino-finance/klend-sdk
# Liquidity SDK
npm install @kamino-finance/kliquidity-sdk
# Oracle SDK
npm install @kamino-finance/scope-sdk
# Required peer dependencies
npm install @solana/web3.js @coral-xyz/anchor decimal.js# .env file
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
WALLET_KEYPAIR_PATH=./keypair.jsonThe lending SDK enables interaction with Kamino's lending markets for deposits, borrows, repayments, and liquidations.
| Class | Purpose |
|---|---|
KaminoMarket | Load and interact with lending markets |
KaminoAction | Build lending transactions (deposit, borrow, repay, withdraw) |
KaminoObligation | Manage user obligations (positions) |
KaminoReserve | Access reserve configurations and stats |
VanillaObligation | Standard obligation type |
import { KaminoMarket } from "@kamino-finance/klend-sdk";
import { Connection, PublicKey } from "@solana/web3.js";
const connection = new Connection("https://api.mainnet-beta.solana.com");
// Main lending market address
const MAIN_MARKET = new PublicKey("7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF");
// Load market with basic data
const market = await KaminoMarket.load(connection, MAIN_MARKET);
// Load reserves for detailed data
await market.loadReserves();
// Get specific reserve
const usdcReserve = market.getReserve("USDC");
console.log("Total Deposits:", usdcReserve?.stats.totalDepositsWads.toString());
console.log("LTV:", usdcReserve?.stats.loanToValueRatio);
console.log("Borrow APY:", usdcReserve?.stats.borrowInterestAPY);
console.log("Supply APY:", usdcReserve?.stats.supplyInterestAPY);
// Refresh all data including obligations
await market.refreshAll();import { KaminoAction, VanillaObligation, PROGRAM_ID } from "@kamino-finance/klend-sdk";
import { Keypair, sendAndConfirmTransaction } from "@solana/web3.js";
import Decimal from "decimal.js";
async function deposit(
market: KaminoMarket,
wallet: Keypair,
tokenSymbol: string,
amount: Decimal
) {
// Build deposit transaction
const kaminoAction = await KaminoAction.buildDepositTxns(
market,
amount.toString(), // Amount in base units
tokenSymbol, // e.g., "USDC", "SOL"
wallet.publicKey,
new VanillaObligation(PROGRAM_ID),
0, // Additional compute budget (optional)
true, // Include Ata init instructions
undefined, // Referrer (optional)
undefined, // Current slot (optional)
"finalized" // Commitment
);
// Get all instructions
const instructions = [
...kaminoAction.setupIxs,
...kaminoAction.lendingIxs,
...kaminoAction.cleanupIxs,
];
// Create and send transaction
const tx = new Transaction().add(...instructions);
const signature = await sendAndConfirmTransaction(connection, tx, [wallet]);
return signature;
}async function borrow(
market: KaminoMarket,
wallet: Keypair,
tokenSymbol: string,
amount: Decimal
) {
const kaminoAction = await KaminoAction.buildBorrowTxns(
market,
amount.toString(),
tokenSymbol,
wallet.publicKey,
new VanillaObligation(PROGRAM_ID),
0,
true,
false, // Include deposit for fees (optional)
undefined,
undefined,
"finalized"
);
const instructions = [
...kaminoAction.setupIxs,
...kaminoAction.lendingIxs,
...kaminoAction.cleanupIxs,
];
const tx = new Transaction().add(...instructions);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}async function repay(
market: KaminoMarket,
wallet: Keypair,
tokenSymbol: string,
amount: Decimal | "max"
) {
const repayAmount = amount === "max" ? "max" : amount.toString();
const kaminoAction = await KaminoAction.buildRepayTxns(
market,
repayAmount,
tokenSymbol,
wallet.publicKey,
new VanillaObligation(PROGRAM_ID),
0,
true,
undefined,
"finalized"
);
const instructions = [
...kaminoAction.setupIxs,
...kaminoAction.lendingIxs,
...kaminoAction.cleanupIxs,
];
const tx = new Transaction().add(...instructions);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}async function withdraw(
market: KaminoMarket,
wallet: Keypair,
tokenSymbol: string,
amount: Decimal | "max"
) {
const withdrawAmount = amount === "max" ? "max" : amount.toString();
const kaminoAction = await KaminoAction.buildWithdrawTxns(
market,
withdrawAmount,
tokenSymbol,
wallet.publicKey,
new VanillaObligation(PROGRAM_ID),
0,
true,
undefined,
"finalized"
);
const instructions = [
...kaminoAction.setupIxs,
...kaminoAction.lendingIxs,
...kaminoAction.cleanupIxs,
];
const tx = new Transaction().add(...instructions);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}// Get single vanilla obligation for user
const obligation = await market.getUserVanillaObligation(wallet.publicKey);
if (obligation) {
console.log("Deposits:", obligation.state.deposits);
console.log("Borrows:", obligation.state.borrows);
console.log("Health Factor:", obligation.refreshedStats.borrowLimit);
}
// Get all obligations for user
const allObligations = await market.getAllUserObligations(wallet.publicKey);
// Get obligations for specific reserve
const reserveObligations = await market.getAllUserObligationsForReserve(
wallet.publicKey,
usdcReserve
);
// Check if reserve is part of obligation
const isReserveInObligation = market.isReserveInObligation(
obligation,
usdcReserve
);async function liquidate(
market: KaminoMarket,
liquidator: Keypair,
obligationOwner: PublicKey,
repayTokenSymbol: string,
withdrawTokenSymbol: string,
repayAmount: Decimal
) {
const kaminoAction = await KaminoAction.buildLiquidateTxns(
market,
repayAmount.toString(),
repayTokenSymbol,
withdrawTokenSymbol,
obligationOwner,
liquidator.publicKey,
new VanillaObligation(PROGRAM_ID),
0,
true,
"finalized"
);
const instructions = [
...kaminoAction.setupIxs,
...kaminoAction.lendingIxs,
...kaminoAction.cleanupIxs,
];
const tx = new Transaction().add(...instructions);
return await sendAndConfirmTransaction(connection, tx, [liquidator]);
}Kamino supports leveraged positions through the multiply feature.
import {
getLeverageDepositIxns,
getLeverageWithdrawIxns,
calculateLeverageMultiplier
} from "@kamino-finance/klend-sdk/leverage";
async function openLeveragedPosition(
market: KaminoMarket,
wallet: Keypair,
collateralToken: string,
borrowToken: string,
depositAmount: Decimal,
targetLeverage: number // e.g., 2x, 3x
) {
// Calculate parameters for target leverage
const leverageParams = await calculateLeverageMultiplier(
market,
collateralToken,
borrowToken,
depositAmount,
targetLeverage
);
// Build leverage deposit instructions
const { instructions, lookupTables } = await getLeverageDepositIxns(
market,
wallet.publicKey,
collateralToken,
borrowToken,
depositAmount,
leverageParams,
new VanillaObligation(PROGRAM_ID)
);
// Execute transaction with address lookup tables
const tx = new VersionedTransaction(/* ... */);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}async function closeLeveragedPosition(
market: KaminoMarket,
wallet: Keypair,
collateralToken: string,
borrowToken: string
) {
const { instructions, lookupTables } = await getLeverageWithdrawIxns(
market,
wallet.publicKey,
collateralToken,
borrowToken,
"max", // Withdraw full position
new VanillaObligation(PROGRAM_ID)
);
const tx = new VersionedTransaction(/* ... */);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}Automate actions based on LTV or price thresholds.
import {
createLtvBasedOrder,
LtvOrderType
} from "@kamino-finance/klend-sdk/obligation_orders";
// Create order to repay when LTV exceeds threshold
async function createLtvOrder(
market: KaminoMarket,
wallet: Keypair,
targetLtv: number, // e.g., 0.8 for 80%
repayToken: string,
repayAmount: Decimal
) {
const orderIx = await createLtvBasedOrder(
market,
wallet.publicKey,
new VanillaObligation(PROGRAM_ID),
{
type: LtvOrderType.REPAY_ON_HIGH_LTV,
triggerLtv: targetLtv,
repayToken,
repayAmount: repayAmount.toString(),
}
);
const tx = new Transaction().add(orderIx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}import {
createPriceBasedOrder,
PriceOrderType
} from "@kamino-finance/klend-sdk/obligation_orders";
// Create stop-loss order
async function createStopLossOrder(
market: KaminoMarket,
wallet: Keypair,
tokenSymbol: string,
triggerPrice: Decimal,
action: "repay" | "withdraw"
) {
const orderIx = await createPriceBasedOrder(
market,
wallet.publicKey,
new VanillaObligation(PROGRAM_ID),
{
type: PriceOrderType.STOP_LOSS,
tokenSymbol,
triggerPrice: triggerPrice.toString(),
action,
}
);
const tx = new Transaction().add(orderIx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}Automated liquidity management for concentrated liquidity positions on Orca, Raydium, and Meteora.
import { Kamino } from "@kamino-finance/kliquidity-sdk";
import { Connection, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection(clusterApiUrl("mainnet-beta"));
const kamino = new Kamino("mainnet-beta", connection);// Get all strategies
const strategies = await kamino.getStrategies();
// Get strategy by address
const strategy = await kamino.getStrategyByAddress(
new PublicKey("strategy_address")
);
// Get strategy by kToken mint
const strategyByMint = await kamino.getStrategyByKTokenMint(
new PublicKey("ktoken_mint")
);
// Get strategies with filters
const filteredStrategies = await kamino.getAllStrategiesWithFilters({
strategyType: "NON_PEGGED", // NON_PEGGED, PEGGED, STABLE
status: "LIVE", // LIVE, STAGING, DEPRECATED
tokenA: new PublicKey("..."), // Filter by token A
tokenB: new PublicKey("..."), // Filter by token B
});| Type | Description | Example Pairs |
|---|---|---|
NON_PEGGED | Uncorrelated assets | SOL-BONK, SOL-USDC |
PEGGED | Loosely correlated | BSOL-JitoSOL, mSOL-SOL |
STABLE | Price-stable | USDC-USDT, USDH-USDC |
// Get share price
const sharePrice = await kamino.getStrategySharePrice(strategy);
console.log("Share Price:", sharePrice.toString());
// Get share data
const shareData = await kamino.getStrategyShareData(strategy);
console.log("Total Shares:", shareData.totalShares);
console.log("Token A per Share:", shareData.tokenAPerShare);
console.log("Token B per Share:", shareData.tokenBPerShare);
// Get token amounts per share
const tokenAmounts = await kamino.getTokenAAndBPerShare(strategy);
console.log("Token A:", tokenAmounts.tokenA);
console.log("Token B:", tokenAmounts.tokenB);
// Get strategy price range
const range = await kamino.getStrategyRange(strategy);
console.log("Lower Price:", range.lowerPrice);
console.log("Upper Price:", range.upperPrice);
console.log("Current Price:", range.currentPrice);import Decimal from "decimal.js";
async function depositToStrategy(
kamino: Kamino,
wallet: Keypair,
strategyAddress: PublicKey,
tokenAAmount: Decimal,
tokenBAmount: Decimal,
slippage: Decimal // e.g., new Decimal(0.01) for 1%
) {
const strategy = await kamino.getStrategyByAddress(strategyAddress);
// Build deposit instructions
const depositIxs = await kamino.deposit(
strategy,
wallet.publicKey,
tokenAAmount,
tokenBAmount,
slippage
);
// Create transaction with extra compute budget
const tx = kamino.createTransactionWithExtraBudget();
tx.add(...depositIxs);
await kamino.assignBlockInfoToTransaction(tx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}async function singleTokenDeposit(
kamino: Kamino,
wallet: Keypair,
strategyAddress: PublicKey,
tokenAmount: Decimal,
isTokenA: boolean, // true for Token A, false for Token B
slippage: Decimal
) {
const strategy = await kamino.getStrategyByAddress(strategyAddress);
const depositIxs = await kamino.singleTokenDeposit(
strategy,
wallet.publicKey,
tokenAmount,
isTokenA,
slippage
);
const tx = kamino.createTransactionWithExtraBudget();
tx.add(...depositIxs);
await kamino.assignBlockInfoToTransaction(tx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}async function withdrawFromStrategy(
kamino: Kamino,
wallet: Keypair,
strategyAddress: PublicKey,
shareAmount: Decimal, // Number of shares to withdraw
slippage: Decimal
) {
const strategy = await kamino.getStrategyByAddress(strategyAddress);
const withdrawIxs = await kamino.withdraw(
strategy,
wallet.publicKey,
shareAmount,
slippage
);
const tx = kamino.createTransactionWithExtraBudget();
tx.add(...withdrawIxs);
await kamino.assignBlockInfoToTransaction(tx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}
// Withdraw all shares
async function withdrawAllShares(
kamino: Kamino,
wallet: Keypair,
strategyAddress: PublicKey,
slippage: Decimal
) {
const strategy = await kamino.getStrategyByAddress(strategyAddress);
const withdrawIxs = await kamino.withdrawAllShares(
strategy,
wallet.publicKey,
slippage
);
const tx = kamino.createTransactionWithExtraBudget();
tx.add(...withdrawIxs);
await kamino.assignBlockInfoToTransaction(tx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}async function collectFeesAndRewards(
kamino: Kamino,
wallet: Keypair,
strategyAddress: PublicKey
) {
const strategy = await kamino.getStrategyByAddress(strategyAddress);
const collectIxs = await kamino.collectFeesAndRewards(
strategy,
wallet.publicKey
);
const tx = kamino.createTransactionWithExtraBudget();
tx.add(...collectIxs);
await kamino.assignBlockInfoToTransaction(tx);
return await sendAndConfirmTransaction(connection, tx, [wallet]);
}// Get supported DEXes
const dexes = kamino.getSupportedDexes();
// Returns: ["ORCA", "RAYDIUM", "METEORA"]
// Get fee tiers for DEX
const feeTiers = kamino.getFeeTiersForDex("ORCA");
// Get pools for token pair
const orcaPools = await kamino.getOrcaPoolsForTokens(tokenAMint, tokenBMint);
const raydiumPools = await kamino.getRaydiumPoolsForTokens(tokenAMint, tokenBMint);
const meteoraPools = await kamino.getMeteoraPoolsForTokens(tokenAMint, tokenBMint);
// Get current price for pair
const price = await kamino.getPriceForPair("ORCA", tokenAMint, tokenBMint);// Get available rebalance methods
const methods = kamino.getRebalanceMethods();
// Returns: ["MANUAL", "DRIFT", "TAKE_PROFIT", "PERIODIC", "PRICE_PERCENTAGE", ...]
// Get enabled methods
const enabledMethods = kamino.getEnabledRebalanceMethods();
// Get default method
const defaultMethod = kamino.getDefaultRebalanceMethod();
// Read rebalance parameters for strategy
const driftParams = await kamino.readDriftRebalanceParams(strategy);
const periodicParams = await kamino.readPeriodicRebalanceParams(strategy);
const priceParams = await kamino.readPricePercentageParams(strategy);async function createStrategy(
kamino: Kamino,
admin: Keypair,
params: {
dex: "ORCA" | "RAYDIUM" | "METEORA";
tokenAMint: PublicKey;
tokenBMint: PublicKey;
feeTierBps: Decimal;
rebalanceMethod: string;
}
) {
const strategyKeypair = Keypair.generate();
// Check token accounts exist
const tokenAAccount = await kamino.getAssociatedTokenAddressAndData(
params.tokenAMint,
admin.publicKey
);
const tokenBAccount = await kamino.getAssociatedTokenAddressAndData(
params.tokenBMint,
admin.publicKey
);
// Create strategy account
const createAccountIx = await kamino.createStrategyAccount(
strategyKeypair.publicKey
);
// Initialize strategy
const initIxs = await kamino.initializeStrategy(
strategyKeypair.publicKey,
admin.publicKey,
params
);
const tx = kamino.createTransactionWithExtraBudget();
tx.add(createAccountIx, ...initIxs);
await kamino.assignBlockInfoToTransaction(tx);
return await sendAndConfirmTransaction(
connection,
tx,
[admin, strategyKeypair],
{ commitment: "finalized" }
);
}Oracle price aggregator providing reliable pricing data.
import { Scope } from "@kamino-finance/scope-sdk";
import { Connection, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection(clusterApiUrl("mainnet-beta"));
const scope = new Scope("mainnet-beta", connection);// Get all oracle prices
const prices = await scope.getOraclePrices();
// Prices indexed by token
console.log("SOL Price:", prices.get("SOL"));
console.log("USDC Price:", prices.get("USDC"));
// Get specific price
const solPrice = await scope.getPrice("SOL");
console.log("SOL/USD:", solPrice.price.toString());
console.log("Timestamp:", solPrice.timestamp);
console.log("Confidence:", solPrice.confidence);Scope aggregates from multiple oracle sources:
// Get price with source info
const priceData = await scope.getPriceWithMetadata("SOL");
console.log("Price:", priceData.price);
console.log("Source:", priceData.source);
console.log("Age (slots):", priceData.ageSlots);# Deposit tokens
yarn cli deposit --url <RPC> --owner ./keypair.json --token USDC --amount 100
# Print all lending market accounts
yarn cli print-all-lending-market-accounts --rpc <RPC>
# Print all reserve accounts
yarn cli print-all-reserve-accounts --rpc <RPC>
# Print all obligation accounts
yarn cli print-all-obligation-accounts --rpc <RPC>
# Filter with jq
yarn cli print-all-reserve-accounts --rpc <RPC> | jq '.lastUpdateSlot'
yarn cli print-all-obligation-accounts --rpc <RPC> | jq --stream 'select(.[0][1] == "owner")'| Program | Address |
|---|---|
| Kamino Lending | KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD |
| Main Market | 7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF |
| Kamino Liquidity | KLIQ... (varies) |
| Scope Oracle | ScopE... (varies) |
Each reserve has configurable parameters:
interface ReserveConfig {
// Collateral configuration
loanToValueRatio: number; // Max borrowing power (e.g., 0.8 = 80%)
liquidationThreshold: number; // Liquidation trigger (e.g., 0.85 = 85%)
liquidationBonus: number; // Liquidator reward (e.g., 0.05 = 5%)
// Interest rate model
optimalUtilizationRate: number; // Target utilization
borrowRateCurve: {
baseRate: number;
optimalRate: number;
maxRate: number;
};
// Fees
protocolTakeRate: number; // Protocol fee on interest
hostFeeRate: number; // Host integration fee
// Limits
depositLimit: number; // Max deposits
borrowLimit: number; // Max borrows
// Status
depositEnabled: boolean;
borrowEnabled: boolean;
withdrawEnabled: boolean;
}import { KaminoError, ErrorCode } from "@kamino-finance/klend-sdk";
try {
await kaminoAction.execute();
} catch (error) {
if (error instanceof KaminoError) {
switch (error.code) {
case ErrorCode.InsufficientCollateral:
console.error("Not enough collateral for this borrow");
break;
case ErrorCode.BorrowLimitExceeded:
console.error("Borrow limit reached for this reserve");
break;
case ErrorCode.LiquidationThresholdExceeded:
console.error("Position is at risk of liquidation");
break;
case ErrorCode.InvalidObligation:
console.error("Obligation account not found or invalid");
break;
default:
console.error("Kamino error:", error.message);
}
} else {
throw error;
}
}async function checkHealthFactor(
market: KaminoMarket,
wallet: PublicKey
): Promise<number> {
await market.refreshAll();
const obligation = await market.getUserVanillaObligation(wallet);
if (!obligation) return Infinity;
const stats = obligation.refreshedStats;
const healthFactor = stats.borrowLimit / stats.borrowedValue;
if (healthFactor < 1.1) {
console.warn("WARNING: Health factor below 1.1, consider adding collateral");
}
return healthFactor;
}// Use lookup tables for smaller transactions
const { instructions, lookupTables } = await kaminoAction.buildWithLookupTables();
// Create versioned transaction
const messageV0 = new TransactionMessage({
payerKey: wallet.publicKey,
recentBlockhash: (await connection.getLatestBlockhash()).blockhash,
instructions,
}).compileToV0Message(lookupTables);
const tx = new VersionedTransaction(messageV0);
tx.sign([wallet]);
await sendAndConfirmTransaction(connection, tx, [wallet]);// For liquidity operations, always use slippage protection
const slippage = new Decimal(0.005); // 0.5% max slippage
const depositIxs = await kamino.deposit(
strategy,
wallet.publicKey,
tokenAAmount,
tokenBAmount,
slippage // Protects against price movement
);import type {
// Lending types
KaminoMarket,
KaminoAction,
KaminoObligation,
KaminoReserve,
VanillaObligation,
ReserveConfig,
ObligationStats,
// Liquidity types
Kamino,
WhirlpoolStrategy,
StrategyWithAddress,
ShareData,
PositionRange,
RebalanceMethod,
StrategiesFilters,
// Oracle types
Scope,
OraclePrices,
PriceData,
} from "@kamino-finance/klend-sdk";Kamino 2.0 introduced a fully integrated application with two key layers:
| Asset | Type | Notes |
|---|---|---|
| nxSOL | LST | Nansen liquid staking token |
| Huma RWA | RWA | Real-world asset backed collateral |
| JitoSOL | LST | Jito liquid staking token |
Decentralized decision-making via KMNO stakers will be activated, allowing token holders to vote on:
kamino/
├── SKILL.md # This file
├── resources/
│ ├── klend-api-reference.md # Complete lending API
│ ├── kliquidity-api-reference.md # Complete liquidity API
│ ├── scope-api-reference.md # Oracle API reference
│ ├── reserve-configs.md # Reserve configurations
│ └── program-addresses.md # All program addresses
├── examples/
│ ├── lending/
│ │ ├── deposit-withdraw.md # Deposit & withdraw examples
│ │ ├── borrow-repay.md # Borrowing examples
│ │ ├── leverage.md # Multiply/leverage examples
│ │ └── liquidation.md # Liquidation bot example
│ ├── liquidity/
│ │ ├── strategy-management.md # Strategy operations
│ │ ├── deposits-withdrawals.md # LP operations
│ │ └── rebalancing.md # Rebalance strategies
│ └── oracle/
│ └── price-feeds.md # Oracle usage examples
├── templates/
│ ├── lending-setup.ts # Lending starter
│ ├── liquidity-setup.ts # Liquidity starter
│ └── full-integration.ts # Complete integration
└── docs/
├── troubleshooting.md # Common issues
└── advanced-patterns.md # Complex patterns© sendaifun, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 13 other files in skills/kamino of sendaifun/skills.
Open the folder on GitHubat commit 06b36b8
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sendaifun/skills, which our catalogue first saw on October 7, 2026.
Kamino next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Kamino this skillsendaifun/skills | 130 | 1 repos | ~6.8k | Automated safety check: Notes | Apache-2.0 | |
| Swapper Depositswapperfinance/swapper-toolkit | 852 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Solana Payments Wallets Tradingnpc-live/clawfirm | 156 | 1 repos | ~4.7k | Automated safety check: Pass | MIT | |
| Trading Signalbinance/binance-skills-hub | 1.1k | — | ~682 | Automated safety check: Pass | None | |
| Squadsinternet-court/internet-court-skill | 6.6k | 2 repos | ~5.9k | Automated safety check: Pass | Apache-2.0 | |
| Binance Leaderboardbinance/binance-skills-hub | 1.1k | — | ~2.5k | Automated safety check: Pass | None |
swapperfinance/swapper-toolkit
Deposit and bridge funds into a wallet or protocol using Swapper Finance.
npc-live/clawfirm
Pay people in SOL or USDC, buy and sell tokens, check prices, discover trending and new tokens, create and manage Solana wallets, stake SOL, earn yield through lending and managed vaults, borrow…
binance/binance-skills-hub
Per-trade smart-money signals — each result is a discrete buy or sell event from a tracked smart-money wallet, with trigger price, current price, max gain since trigger, and exit rate.
internet-court/internet-court-skill
Complete guide for Squads Protocol - Solana's leading smart account and multisig infrastructure.
binance/binance-skills-hub
On-chain wallet leaderboard and Gem Hunter analysis on Binance Web3.
aAAaqwq/AGI-Super-Team
AI-powered crypto trading agent and LLM gateway via natural language.
sendaifun/skills
Breaks a shared video or GIF down frame by frame to recreate its motion as working code instead of guessing the timing by eye.
sendaifun/skills
Builds and debugs Arcium encrypted computation apps on Solana: Arcis circuits, Anchor orchestration, encrypted inputs and the init, queue and callback flow.
sendaifun/skills
Complete CoinGecko Solana API integration for token prices, DEX pool data, OHLCV charts, trades, and market analytics.
sendaifun/skills
Integrates Phantom wallet connection, social login, and transaction signing into React, React Native, or vanilla JS apps on Solana.
sendaifun/skills
Comprehensive guidance for integrating Jupiter APIs (Ultra Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing).
sendaifun/skills
Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework.
Works with
Categories
Complete guide for Kamino Finance - Solana's leading DeFi protocol for lending, borrowing, liquidity management, and leverage trading. Kamino is an agent skill from sendaifun/skills. Complete guide for Kamino Finance - Solana's leading DeFi protocol for lending, borrowing, liquidity management, and leverage trading.
Kamino fits situations like: tasks that involve Banking and insurance; tasks that involve Crypto and DeFi analysis; tasks that involve Trading and backtesting.
Run `npx skills add sendaifun/skills --skill kamino -a claude-code`. Or copy the skill folder (skills/kamino in sendaifun/skills) into .claude/skills/kamino in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sendaifun/skills --skill kamino -a codex`. Or copy the skill folder (skills/kamino in sendaifun/skills) into .agents/skills/kamino in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sendaifun/skills --skill kamino -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kamino, .gemini/skills/kamino, .github/skills/kamino and .opencode/skills/kamino in your project.
Going by SKILL.md and its folder, Kamino needs TypeScript for the scripts in its folder and the command-line tools its instructions call (yarn, npm and jq). Our summary lists: Node.js.
SKILL.md names 5 domains. In commands or code: api.mainnet-beta.solana.com; the agent is likely to contact it when it follows the instructions. As links in the text: github.com, kamino.finance, docs.kamino.finance and discord.gg. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Kamino is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.8k tokens (SKILL.md is roughly 27k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Kamino: Swapper Deposit (swapperfinance/swapper-toolkit, 852 stars), Solana Payments Wallets Trading (npc-live/clawfirm, 156 stars), Trading Signal (binance/binance-skills-hub, 1.1k stars) and Squads (internet-court/internet-court-skill, 6.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sendaifun (a GitHub organization) maintains it in sendaifun/skills, which has 130 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on July 31, 2026.
Source: sendaifun/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.