Lending Tools
10 tools for Vesu V2 lending operations — supply, borrow, repay, withdraw, close, monitor, auto-rebalance, quote health
Prerequisite: All lending tools require an active authenticated session. Call
get_auth_statusfirst to verify.
Recommended Flow
Supply (earn yield)
1. list_lending_pools → Find pools and check APY rates
2. supply_assets → Deposit tokens into a pool
3. get_lending_position → Verify positionBorrow (leverage)
1. list_lending_pools → Find pools and supported pairs
2. borrow_assets → Deposit collateral + borrow in one call
3. get_lending_position → Monitor Health Factor
4. monitor_lending_position → Ongoing health monitoring with alerts
5. auto_rebalance_lending → Auto-fix when HF drops
6. repay_debt → Repay when ready
7. close_position → Or close everything atomicallylist_lending_pools
List available Vesu V2 lending pools with live APY/APR data, supported assets, and pairs.
| Param | Type | Required | Description |
|---|---|---|---|
name | string | No | Filter pools by name (partial match). Omit to list all. |
This is a read-only tool.
get_lending_position
Get the user's position in a lending pool — collateral value, debt value, Health Factor, and risk level.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name (e.g., Prime, Re7) or contract address |
collateral_token | string | Yes | Collateral token symbol (e.g., ETH, STRK) |
borrow_token | string | No | Borrow token symbol (e.g., USDC). Optional for supply-only positions. |
This is a read-only tool. Use it to monitor Health Factor before and after operations.
Health Factor Guide:
- Above 1.3 — Safe
- 1.1 – 1.3 — Warning (monitor closely)
- 1.05 – 1.1 — Danger (liquidation risk)
- ≤ 1.05 — Critical (imminent liquidation)
supply_assets
Supply tokens into a Vesu V2 pool to earn interest.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name (e.g., Prime, Re7) or contract address |
amount | string | Yes | Amount to supply (e.g., 100, 0.5) |
token | string | Yes | Token symbol to supply (e.g., STRK, ETH, USDC) |
Note: There is no minimum amount for supply operations.
withdraw_assets
Withdraw previously supplied tokens from a pool.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name or contract address |
amount | string | Yes | Amount to withdraw |
token | string | Yes | Token symbol to withdraw |
borrow_assets
Borrow tokens by supplying collateral. Atomically deposits collateral and borrows the debt asset in a single transaction.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name or contract address |
collateral_amount | string | Yes | Collateral amount to deposit |
collateral_token | string | Yes | Collateral token symbol (e.g., ETH, STRK) |
borrow_amount | string | Yes | Amount to borrow |
borrow_token | string | Yes | Token to borrow (e.g., USDC, USDT) |
use_supplied | boolean | No | Set true to use previously supplied earn position as collateral |
Important: Monitor your Health Factor after borrowing. Use
get_lending_positionormonitor_lending_positionto check.
repay_debt
Repay borrowed tokens on an existing lending position.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name or contract address |
amount | string | Yes | Amount to repay |
token | string | Yes | Token to repay (e.g., USDC, USDT) |
collateral_token | string | Yes | Collateral token of the position — needed to identify which position to repay |
close_position
Atomically close an active lending position. Repays all outstanding debt and withdraws all collateral in a single transaction.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name or contract address |
collateral_token | string | Yes | Collateral token symbol (e.g., STRK, ETH) |
debt_token | string | Yes | Borrowed token symbol (e.g., USDC, USDT) |
Note: This tool handles the full close flow atomically — repay debt + withdraw collateral in one transaction.
monitor_lending_position
Monitor health factors across lending positions with 4-level risk classification and actionable alerts. Scan all pools or check a specific position.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | No | Pool name or address. Omit to scan all pools. |
collateral_token | string | No | Collateral token (required with pool) |
borrow_token | string | No | Debt token (required with pool) |
warning_threshold | number | No | Custom warning threshold (default: 1.3) |
This is a read-only tool — safe to call without user confirmation.
Returns for each position:
- Health factor value
- Risk level (
SAFE,WARNING,DANGER,CRITICAL) - Alert message (if risk is elevated)
- Recommendation (repay amount or collateral to add)
auto_rebalance_lending
Automatically adjust a lending position to improve its health factor. Chooses the best strategy (repay debt or add collateral) based on wallet balances.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name or contract address |
collateral_token | string | Yes | Collateral token symbol |
borrow_token | string | Yes | Debt token symbol |
strategy | string | No | repay, add-collateral, or auto (default) |
target_health_factor | number | No | Target health factor (default: 1.3) |
simulate | boolean | No | Set true to preview without executing |
Important: This is a transactional tool. Always confirm with the user and use
simulate: truefirst to preview the action.
Returns: action taken, amount, token, previous HF, estimated new HF, and transaction hash.
lending_quote_health
Simulate the impact of a lending action on the position's Health Factor without executing. Useful for previewing how a borrow, repay, deposit, or withdrawal would change the health factor before committing.
| Param | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool name or contract address |
collateral_token | string | Yes | Collateral token symbol |
debt_token | string | Yes | Debt token symbol |
action | string | Yes | Action to simulate: borrow, repay, deposit, withdraw |
amount | string | Yes | Amount for the action |
This is a read-only tool — safe to call without user confirmation.
Returns: current health factor, projected health factor, and risk change indicator (IMPROVING, DECLINING, STABLE).
CLI equivalent: Lending Commands
Last updated on