lending
Manage Vesu V2 lending positions on Starknet — supply assets, borrow against collateral, repay debt, withdraw, close positions, monitor health factors, and auto-rebalance risky positions. Use this skill when the user mentions lending, borrowing, supplying collateral, Vesu, earn interest, health factor, liquidation risk, monitoring positions, auto-rebalancing, protecting against liquidation, "my position is risky", "health factor low", or DeFi yield from lending protocols — even if they don't say "lending" explicitly.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- lending
- license
- MIT
- metadata
- { "author": "ahmetenesdur", "version": "0.2.0", "category": "transaction" }
- description
- Manage Vesu V2 lending positions on Starknet — supply assets, borrow against collateral, repay debt, withdraw, close positions, monitor health factors, and auto-rebalance risky positions. Use this skill when the user mentions lending, borrowing, supplying collateral, Vesu, earn interest, health factor, liquidation risk, monitoring positions, auto-rebalancing, protecting against liquidation, "my position is risky", "health factor low", or DeFi yield from lending protocols — even if they don't say "lending" explicitly.
- allowed-tools
- [ "Bash(npx starkfi@latest lend-pools)", "Bash(npx starkfi@latest lend-pools *)", "Bash(npx starkfi@latest lend-status *)", "Bash(npx starkfi@latest lend-supply *)", "Bash(npx starkfi@latest lend-withdraw *)", "Bash(npx starkfi@latest lend-borrow *)", "Bash(npx starkfi@latest lend-repay *)", "Bash(npx starkfi@latest lend-close *)", "Bash(npx starkfi@latest lend-monitor)", "Bash(npx starkfi@latest lend-monitor *)", "Bash(npx starkfi@latest lend-auto *)", "Bash(npx starkfi@latest status)", "Bash(npx starkfi@latest balance)", "Bash(npx starkfi@latest balance *)", "Bash(npx starkfi@latest tx-status *)" ]
- compatibility
- Requires Node.js 22+ and npx.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md339 B
- 参考文档TRUST.auto.yaml2.3 KB
03 SKILL.md 正文
Lending (Vesu V2)
Manage lending and borrowing positions on Vesu V2 protocol on Starknet. Supply assets to earn yield, borrow against collateral, repay debt, monitor health factors, auto-rebalance risky positions, and close positions.
Prerequisites
- Active session required.
- Sufficient token balance for supply/repay operations + gas fees.
Rules
- BEFORE any lending action, run
npx starkfi@latest lend-poolsto discover available pools and tokens. Uselend-pools <name>for detailed pool info including APY rates. - Pool can be specified by name (e.g.
Prime,Genesis) or by contract address (0x...). - BEFORE borrowing, run
npx starkfi@latest lend-statusto check existing positions, or with--pooland--collateral-tokenfor Health Factor. Health Factor = collateral value × the pair's max LTV / debt value (shown asmaxLtv); below 1.0 Vesu can liquidate the position.- Health Factor > 2.0 → Safe to borrow.
- Health Factor 1.5 – 2.0 → WARN the user about increasing risk.
- Health Factor < 1.5 → STRONGLY advise against borrowing. Suggest repaying instead.
- Health Factor < 1.1 → DO NOT proceed without explicit double-confirmation from the user.
- Health Factor < 1.0 → The position can be liquidated now. Tell the user immediately and suggest
lend-auto --simulate.
- AFTER any transactional operation, verify with
tx-status. - When using
--use-supplied, the borrow is backed by the user's existing earn positions (supplied positions) rather than transferring from wallet. - When the user asks about health, risk, or liquidation — use
lend-monitorfirst for a comprehensive overview with 4-level risk classification (SAFE/WARNING/DANGER/CRITICAL). - When a position's health factor is low, suggest
lend-autoto automatically rebalance. Always use--simulatefirst to preview the action before executing.
Commands
Discovery
# List all pools (overview table)
npx starkfi@latest lend-pools [--json]
# Detailed pool info with APY rates
npx starkfi@latest lend-pools <name> [--json]
# View all lending positions (auto-scan)
npx starkfi@latest lend-status
# View specific position status
npx starkfi@latest lend-status --pool <name|address> --collateral-token <symbol> [--borrow-token <symbol>]
Supply & Withdraw
# Supply (deposit assets to earn yield)
npx starkfi@latest lend-supply <amount> --pool <name|address> --token <symbol> [--simulate]
# Withdraw (remove supplied assets)
npx starkfi@latest lend-withdraw <amount> --pool <name|address> --token <symbol> [--simulate]
Borrow & Repay
# Borrow (provide collateral and take loan)
npx starkfi@latest lend-borrow \
--pool <name|address> \
--collateral-amount <n> --collateral-token <symbol> \
--borrow-amount <n> --borrow-token <symbol> \
[--use-supplied] [--simulate]
# Repay (pay back borrowed amount)
npx starkfi@latest lend-repay <amount> --pool <name|address> --token <symbol> --collateral-token <symbol> [--simulate]
Close Position
# Atomically repay all debt and withdraw all collateral
npx starkfi@latest lend-close --pool <name|address> --collateral-token <symbol> --borrow-token <symbol> [--simulate]
Health Monitoring
# Scan all positions across all pools
npx starkfi@latest lend-monitor [--json]
# Monitor specific position
npx starkfi@latest lend-monitor --pool <name|address> --collateral-token <symbol> --borrow-token <symbol>
# Custom warning threshold
npx starkfi@latest lend-monitor --warning-threshold 1.5
Auto-Rebalance
# Auto-rebalance (picks best strategy — repay or add collateral)
npx starkfi@latest lend-auto --pool <name|address> --collateral-token <symbol> --borrow-token <symbol>
# With specific strategy
npx starkfi@latest lend-auto --pool <name|address> --collateral-token <symbol> --borrow-token <symbol> --strategy repay
npx starkfi@latest lend-auto --pool <name|address> --collateral-token <symbol> --borrow-token <symbol> --strategy add-collateral
# Simulate first (always recommended)
npx starkfi@latest lend-auto --pool <name|address> --collateral-token <symbol> --borrow-token <symbol> --simulate
Parameters
lend-supply / lend-withdraw
| Parameter | Type | Description | Required |
|---|---|---|---|
amount |
number | Amount (positional) | Yes |
--pool |
string | Pool name or address | Yes |
--token |
string | Token symbol (USDC, ETH, STRK, etc.) |
Yes |
--simulate |
flag | Estimate fees and validate without executing | No |
lend-borrow
| Parameter | Type | Description | Required |
|---|---|---|---|
--pool |
string | Pool name or address | Yes |
--collateral-amount |
number | Collateral amount to supply | Yes |
--collateral-token |
string | Collateral token (e.g. ETH, STRK) |
Yes |
--borrow-amount |
number | Amount to borrow | Yes |
--borrow-token |
string | Token to borrow (e.g. USDC, USDT) |
Yes |
--use-supplied |
flag | Use existing earn positions as collateral | No |
--simulate |
flag | Estimate fees and validate without executing | No |
lend-repay
| Parameter | Type | Description | Required |
|---|---|---|---|
amount |
number | Amount to repay (positional) | Yes |
--pool |
string | Pool name or address | Yes |
--token |
string | Token to repay (e.g. USDC) |
Yes |
--collateral-token |
string | Collateral token of the position | Yes |
--simulate |
flag | Estimate fees and validate without executing | No |
lend-close
| Parameter | Type | Description | Required |
|---|---|---|---|
--pool |
string | Pool name or address | Yes |
--collateral-token |
string | Collateral token symbol | Yes |
--borrow-token |
string | Borrow token symbol | Yes |
--simulate |
flag | Estimate fees and validate without executing | No |
lend-status
Run without arguments to auto-scan all pools. Or specify --pool + --collateral-token for a detailed position view.
| Parameter | Type | Description | Required |
|---|---|---|---|
--pool |
string | Pool name or address | No (auto-scan if omitted) |
--collateral-token |
string | Token supplied/used as collateral | No* |
--borrow-token |
string | Borrow token (needed to see debt + HF) | No |
* Required when
--poolis specified.
lend-monitor
Run without arguments to scan all pools. Or specify --pool + --collateral-token + --borrow-token for a single position.
| Parameter | Type | Description | Required |
|---|---|---|---|
--pool |
string | Pool name or address | No (scans all if omitted) |
--collateral-token |
string | Collateral token symbol | No* |
--borrow-token |
string | Debt token symbol | No* |
--warning-threshold |
number | Custom warning threshold (default: 1.3) | No |
* Required when
--poolis specified.
Risk Levels:
Health Factor = collateral value × the pair's max LTV / debt value. 1.0 is the liquidation point.
| Level | Health Factor | Meaning |
|---|---|---|
| SAFE | > 1.3 | No action needed |
| WARNING | 1.1 – 1.3 | Monitor closely |
| DANGER | 1.05 – 1.1 | Repay debt or add collateral |
| CRITICAL | ≤ 1.05 | Liquidation imminent; below 1.0 it can happen now |
lend-auto
| Parameter | Type | Description | Required |
|---|---|---|---|
--pool |
string | Pool name or address | Yes |
--collateral-token |
string | Collateral token symbol | Yes |
--borrow-token |
string | Debt token symbol | Yes |
--strategy |
string | repay, add-collateral, or auto (default) |
No |
--target-hf |
number | Target health factor (default: 1.3) | No |
--simulate |
flag | Estimate fees and validate without executing | No |
Examples
User: "What lending pools are available?"
npx starkfi@latest lend-pools
User: "Show me details for the Prime pool"
npx starkfi@latest lend-pools Prime
User: "Supply 500 USDC to Prime"
npx starkfi@latest status
npx starkfi@latest balance --token USDC
npx starkfi@latest lend-supply 500 --pool Prime --token USDC --simulate # Preview first
npx starkfi@latest lend-supply 500 --pool Prime --token USDC # Execute
npx starkfi@latest tx-status <hash>
User: "Borrow 100 USDC with ETH collateral from Prime"
npx starkfi@latest lend-status
# Check Health Factor before proceeding
npx starkfi@latest lend-borrow \
--pool Prime \
--collateral-amount 0.1 --collateral-token ETH \
--borrow-amount 100 --borrow-token USDC
npx starkfi@latest tx-status <hash>
User: "Repay my 100 USDC loan from Prime"
npx starkfi@latest lend-repay 100 --pool Prime --token USDC --collateral-token ETH
npx starkfi@latest tx-status <hash>
User: "Close my ETH/USDC position in Prime"
npx starkfi@latest lend-close --pool Prime --collateral-token ETH --borrow-token USDC
npx starkfi@latest tx-status <hash>
User: "How healthy is my position?"
# Comprehensive health monitoring with risk levels
npx starkfi@latest lend-monitor
# Detailed health factor for specific position
npx starkfi@latest lend-monitor --pool Prime --collateral-token ETH --borrow-token USDC
User: "My position is at risk, fix it"
# First, check current state
npx starkfi@latest lend-monitor --pool Prime --collateral-token ETH --borrow-token USDC
# Simulate the auto-rebalance action
npx starkfi@latest lend-auto --pool Prime --collateral-token ETH --borrow-token USDC --simulate
# Execute after user confirms
npx starkfi@latest lend-auto --pool Prime --collateral-token ETH --borrow-token USDC
npx starkfi@latest tx-status <hash>
User: "Protect my ETH/USDC position from liquidation"
# Choose a specific strategy — repay debt
npx starkfi@latest lend-auto --pool Prime --collateral-token ETH --borrow-token USDC --strategy repay --simulate
Error Handling
| Error | Action |
|---|---|
Pool not found |
Run lend-pools to list valid pool names. |
Health Factor too low |
Warn of liquidation risk. Suggest repaying or supplying more. |
Insufficient collateral |
Cannot borrow without supplying first. |
Dust limit |
Borrow amount is below the pool's minimum dollar value (~$10). Increase it. |
Insufficient balance |
Check balance — user may need to swap for the token. |
Not authenticated |
Run authenticate-wallet skill first. |
Monitor failed |
Check pool/token params and retry. |
Rebalance failed |
Check balances, health factor, and retry. |
Related Skills
- Use
balanceto verify available assets before supplying. - Use
tradeto swap tokens if the user doesn't have the right asset. - Use
portfoliofor a full overview including lending positions with USD values. - Use
batchto combine supply operations with swaps, staking, or vault deposits. - Use
trovesfor vault-based yield strategies (different from lending). - Use
lstfor liquid staking yield (xSTRK can also be supplied to lending pools). - Use
portfolio-rebalance(withinportfolioskill) to optimize overall portfolio allocation.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.