StarkFiStarkFi

Lending Commands

Supply, borrow, repay, and manage Vesu V2 lending positions

Prerequisite: All lending commands require an active authenticated session. Run starkfi auth login first.

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 atomically

lend-pools

Lists all available Vesu V2 lending pools.

starkfi lend-pools [name]
starkfi lend-pools --json

Shows 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 --json

lend-supply

Supplies assets into a lending pool to earn yield.

starkfi lend-supply <amount> -p <pool> -t <token>

Flags:

FlagDescription
-p, --pool <name>Pool name (e.g., Prime) or contract address
-t, --token <symbol>Token symbol to supply (e.g., USDC, ETH)
--simulateEstimate fees without executing
--jsonOutput raw JSON

Examples:

starkfi lend-supply 100 -p Prime -t USDC
starkfi lend-supply 0.5 -p "Genesis: Re7 Labs" -t ETH --simulate

Note: Supply uses standard ERC-4626 vToken deposit — there is no minimum amount.


lend-withdraw

Withdraws supplied assets from a pool.

starkfi lend-withdraw <amount> -p <pool> -t <token>

Flags:

FlagDescription
-p, --pool <name>Pool name or contract address
-t, --token <symbol>Token symbol to withdraw
--simulateEstimate fees without executing
--jsonOutput raw JSON

Example:

starkfi lend-withdraw 50 -p Prime -t USDC

lend-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:

FlagDescription
-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-suppliedUse previously supplied yield tokens as collateral
--simulateEstimate fees without executing
--jsonOutput raw JSON

Example:

starkfi lend-borrow -p Prime --collateral-amount 0.5 --collateral-token ETH --borrow-amount 500 --borrow-token USDC

Important: 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:

FlagDescription
-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)
--simulateEstimate fees without executing
--jsonOutput raw JSON

Example:

starkfi lend-repay 500 -p Prime -t USDC --collateral-token ETH

lend-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:

FlagDescription
-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)
--simulateEstimate fees without executing
--jsonOutput raw JSON

Example:

starkfi lend-close -p Prime --collateral-token ETH --borrow-token USDC

lend-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:

FlagDescriptionRequired
-p, --pool <name>Pool name or contract addressNo
--collateral-token <symbol>Token supplied to the pool (e.g., ETH)No*
--borrow-token <symbol>Borrow token (required to see debt position + HF)No
--jsonOutput raw JSONNo

* Required when -p is specified. Omit both -p and --collateral-token to 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 HF

Shows supplied yield balance, collateral value, debt value, health factor, and risk level:

Risk LevelHealth Factor
SAFEAbove 1.5
WARNING1.1 – 1.5
DANGERBelow 1.1
Edit on GitHub

Last updated on

On this page