Lending Commands
Supply, borrow, repay, and manage Vesu V2 lending positions
Prerequisite: All lending commands require an active authenticated session. Run
starkfi auth loginfirst.
Typical Flows
Earn Yield (Supply)
1. starkfi lend-pools prime → Check pools and APY rates
2. starkfi lend-supply 100 -p Prime -t USDC → Supply tokens
3. starkfi lend-status → Verify position (auto-scans all pools)Leverage (Borrow)
1. starkfi lend-pools → Find pools and supported pairs
2. starkfi lend-borrow -p Prime ... → Deposit collateral + borrow
3. starkfi lend-status → Overview of all positions
3b. starkfi lend-status -p Prime --collateral-token ETH --borrow-token USDC → Detailed Health Factor
4. starkfi lend-repay 500 -p Prime -t USDC ... → Repay when ready
5. starkfi lend-close -p Prime ... → Or close everything atomicallylend-pools
Lists all available Vesu V2 lending pools.
starkfi lend-pools [name]
starkfi lend-pools --jsonShows pool name, protocol version, available assets (with APY/APR), and pair count. Optionally filter by name (partial match — shows detailed asset info).
Examples:
starkfi lend-pools
starkfi lend-pools prime
starkfi lend-pools re7 --jsonlend-supply
Supplies assets into a lending pool to earn yield.
starkfi lend-supply <amount> -p <pool> -t <token>Flags:
| Flag | Description |
|---|---|
-p, --pool <name> | Pool name (e.g., Prime) or contract address |
-t, --token <symbol> | Token symbol to supply (e.g., USDC, ETH) |
--simulate | Estimate fees without executing |
--json | Output raw JSON |
Examples:
starkfi lend-supply 100 -p Prime -t USDC
starkfi lend-supply 0.5 -p "Genesis: Re7 Labs" -t ETH --simulateNote: There is no minimum amount for supply operations.
lend-withdraw
Withdraws supplied assets from a pool.
starkfi lend-withdraw <amount> -p <pool> -t <token>Flags:
| Flag | Description |
|---|---|
-p, --pool <name> | Pool name or contract address |
-t, --token <symbol> | Token symbol to withdraw |
--simulate | Estimate fees without executing |
--json | Output raw JSON |
Example:
starkfi lend-withdraw 50 -p Prime -t USDClend-borrow
Borrows assets against your collateral. Atomically deposits collateral and borrows the debt asset in a single transaction.
starkfi lend-borrow -p <pool> --collateral-amount <n> --collateral-token <symbol> --borrow-amount <n> --borrow-token <symbol>Flags:
| Flag | Description |
|---|---|
-p, --pool <name> | Pool name or contract address |
--collateral-amount <n> | Amount of collateral to deposit |
--collateral-token <symbol> | Collateral token symbol (e.g., ETH, STRK) |
--borrow-amount <n> | Amount to borrow |
--borrow-token <symbol> | Token to borrow (e.g., USDC, USDT) |
--use-supplied | Use previously supplied earn positions as collateral |
--simulate | Estimate fees without executing |
--json | Output raw JSON |
Example:
starkfi lend-borrow -p Prime --collateral-amount 0.5 --collateral-token ETH --borrow-amount 500 --borrow-token USDCImportant: Monitor your Health Factor after borrowing with
lend-status.
lend-repay
Repays borrowed debt.
starkfi lend-repay <amount> -p <pool> -t <token> --collateral-token <symbol>Flags:
| Flag | Description |
|---|---|
-p, --pool <name> | Pool name or contract address |
-t, --token <symbol> | Token to repay (e.g., USDC) |
--collateral-token <symbol> | Collateral token of the position (e.g., ETH) |
--simulate | Estimate fees without executing |
--json | Output raw JSON |
Example:
starkfi lend-repay 500 -p Prime -t USDC --collateral-token ETHlend-close
Closes an entire lending position atomically — repays all debt and withdraws all collateral in one transaction.
starkfi lend-close -p <pool> --collateral-token <symbol> --borrow-token <symbol>Flags:
| Flag | Description |
|---|---|
-p, --pool <name> | Pool name or contract address |
--collateral-token <symbol> | Collateral token symbol (e.g., ETH) |
--borrow-token <symbol> | Borrowed token symbol (e.g., USDC) |
--simulate | Estimate fees without executing |
--json | Output raw JSON |
Example:
starkfi lend-close -p Prime --collateral-token ETH --borrow-token USDClend-status
Checks your lending positions. Run without arguments to auto-scan all pools, or specify a pool for detailed position info.
# Auto-scan all pools (no arguments needed)
starkfi lend-status
# Specific pool + token
starkfi lend-status -p <pool> --collateral-token <symbol> [--borrow-token <symbol>]Flags:
| Flag | Description | Required |
|---|---|---|
-p, --pool <name> | Pool name or contract address | No |
--collateral-token <symbol> | Token supplied to the pool (e.g., ETH) | No* |
--borrow-token <symbol> | Borrow token (required to see debt position + HF) | No |
--json | Output raw JSON | No |
* Required when
-pis specified. Omit both-pand--collateral-tokento auto-scan.
Examples:
starkfi lend-status # Scan all pools
starkfi lend-status -p Prime --collateral-token ETH # Supply position
starkfi lend-status -p Prime --collateral-token ETH --borrow-token USDC # With HFShows supplied yield balance, collateral value, debt value, health factor, and risk level:
| Risk Level | Health Factor |
|---|---|
| SAFE | > 1.3 |
| WARNING | 1.1 – 1.3 |
| DANGER | 1.05 – 1.1 |
| CRITICAL | ≤ 1.05 |
lend-monitor
Monitors lending positions and alerts on low health factors. Run without --pool to scan all pools, or specify a pool for a single position check.
# Scan all pools
starkfi lend-monitor
# Specific position
starkfi lend-monitor -p <pool> --collateral-token <symbol> --borrow-token <symbol>Flags:
| Flag | Description | Required |
|---|---|---|
-p, --pool <name> | Pool name or contract address | No |
--collateral-token <symbol> | Collateral token symbol (required with --pool) | No* |
--borrow-token <symbol> | Debt token symbol (required with --pool) | No* |
--warning-threshold <n> | Custom warning threshold (default: 1.3) | No |
--json | Output raw JSON | No |
* Required when
-pis specified.
Risk Levels:
| Risk Level | Health Factor | Alert |
|---|---|---|
| SAFE | > 1.3 | No |
| WARNING | 1.1 – 1.3 | ⚠️ Attention |
| DANGER | 1.05 – 1.1 | 🔴 Repay/add |
| CRITICAL | ≤ 1.05 | 🚨 Liquidation |
Shows collateral amount, debt amount, health factor, risk level, and actionable recommendations for each position.
Examples:
starkfi lend-monitor
starkfi lend-monitor -p Prime --collateral-token ETH --borrow-token USDC
starkfi lend-monitor --warning-threshold 1.5 --jsonlend-auto
Automatically adjusts a lending position to improve the health factor. Supports three strategies.
starkfi lend-auto -p <pool> --collateral-token <symbol> --borrow-token <symbol>Flags:
| Flag | Description | Required |
|---|---|---|
-p, --pool <name> | Pool name or contract address | Yes |
--collateral-token <symbol> | Collateral token symbol | Yes |
--borrow-token <symbol> | Debt token symbol | Yes |
--strategy <type> | repay, add-collateral, or auto (default) | No |
--target-hf <number> | Target health factor (default: 1.3) | No |
--simulate | Preview without executing | No |
Strategies:
| Strategy | Action |
|---|---|
repay | Repay part of the debt to improve HF |
add-collateral | Add more collateral to improve HF |
auto (default) | Automatically pick the best option based on balances |
Shows the action taken, amount, previous and estimated new health factor, and transaction hash.
Examples:
starkfi lend-auto -p Prime --collateral-token ETH --borrow-token USDC
starkfi lend-auto -p Prime --collateral-token ETH --borrow-token USDC --strategy repay
starkfi lend-auto -p Prime --collateral-token ETH --borrow-token USDC --simulateTip: Use
lend-monitorfirst to identify positions that need rebalancing, then uselend-autoto fix them.
MCP equivalent: Lending Tools —
list_lending_pools,supply_assets,borrow_assets,repay_debt,close_position,monitor_lending_position,auto_rebalance_lending
Last updated on