StarkFiStarkFi

Vesu V2 Lending

Supply, borrow, and manage lending positions on Vesu pools

Overview

Vesu provides V2 lending pools on Starknet. StarkFi integrates directly with Vesu's on-chain contracts and REST API for full lending lifecycle management — supply, withdraw, borrow, repay, and close positions.

How StarkFi Uses Vesu

FeatureVesu IntegrationStarkFi Command
Browse PoolsREST API (/pools/{address})lend-pools
SupplyvToken.deposit() (ERC-4626)lend-supply
WithdrawvToken.withdraw()lend-withdraw
Borrowpool.modify_position()lend-borrow
Repaypool.modify_position()lend-repay
Close Positionpool.modify_position()lend-close
Check PositionOn-chain pool.position() + USD pricinglend-status

Supported Pools

StarkFi supports 6 Vesu V2 pools:

PoolDescription
PrimePrimary multi-asset pool
Re7 USDC CoreCore USDC lending pool
Re7 USDC PrimePremium USDC lending
Re7 USDC FrontierFrontier USDC lending
Re7 xBTCBitcoin-denominated lending
Re7 USDC Stable CoreStablecoin-focused lending

Tip: Use starkfi lend-pools to see live APY/APR rates and available assets for each pool.

Health Factor

StarkFi calculates health factor from on-chain position data:

healthFactor = (collateralUSD × maxLTV) / debtUSD

Risk levels:

Risk LevelHealth FactorMeaning
SAFEAbove 1.5Position is healthy
WARNING1.1 – 1.5Monitor closely
DANGERBelow 1.1At risk of liquidation

Important: Monitor your health factor regularly with starkfi lend-status. If it drops below 1.0, your position can be liquidated.

On-Chain Operations

OperationContract MethodDescription
SupplyvToken.deposit()ERC-4626 vault deposit — receives yield-bearing vTokens
WithdrawvToken.withdraw()Redeem vTokens for underlying tokens
Borrowpool.modify_position()Deposit collateral + take on debt atomically
Repaypool.modify_position()Reduce outstanding debt
Closepool.modify_position()Repay all debt + withdraw all collateral in one call
Querypool.position()Read on-chain position state

Technical Details

SettingValue
API Basehttps://api.vesu.xyz
Cache TTL5 minutes
Request Timeout15 seconds
Dust Limit~$10 minimum for borrow positions (collateral and debt)
Amount EncodingU256 split into low/high 128-bit parts for Cairo calldata
Pool Factory0x03760f903a...fb388c0

Error Handling

ErrorCauseResolution
LENDING_FAILEDOn-chain operation failedCheck token allowance, balance, and health factor
POOL_NOT_FOUNDInvalid pool name or addressRun lend-pools to see available pools
NETWORK_ERRORVesu API unreachableRetry — requests use automatic retry with backoff
Edit on GitHub

Last updated on

On this page