Lending Tools
7 tools for Vesu V2 lending operations — supply, borrow, repay, withdraw, close
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. repay_debt → Repay when ready
5. 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.5 — Safe
- 1.1 – 1.5 — Warning (monitor closely)
- Below 1.1 — Danger (at risk of liquidation)
supply_assets
Supply tokens into a Vesu V2 pool to earn interest. Tokens are deposited into the pool's ERC-4626 vToken vault.
| 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: Supply uses standard ERC-4626 vToken deposit — there is no minimum amount.
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 vTokens as collateral |
Important: Monitor your Health Factor after borrowing. Use
get_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.
Last updated on