Lending & Borrowing
This page gives a conceptual view of the PrimeFi v2 lending and borrowing contracts. It is not an ABI or integration specification, and the exact reserve configuration and addresses vary by network.
Core lifecycle
Supply: a user supplies a supported reserve and receives interest-bearing pTokens representing the supplied position.
Use collateral and borrow: an eligible supplied asset can be enabled as collateral. A borrow creates the corresponding variable-debt token balance.
Accrue and monitor: interest indexes update supplied and borrowed balances. Oracle prices and reserve risk parameters determine borrowing capacity and health factor.
Repay or withdraw: repaying reduces debt. If debt remains, a withdrawal must leave the account within the market's collateral requirements.
Liquidation: when an account crosses the configured liquidation threshold, an eligible liquidator can repay part of its debt and receive collateral under the market's liquidation rules.
Cross-chain borrowing, where enabled, adds Stargate liquidity or routing and LayerZero messaging to this local-market flow; see Stargate Borrow. Integrators should verify the selected network, current configuration and deployed address under Smart Contracts Addresses.
PrimeFi v3 uses separate Aave v3.7 deployments, currently on testnets; see PrimeFi v3 Testnets.
Contract overview
The diagram summarizes the principal actors and calls; it intentionally omits many checks and internal interactions.
Last updated