Skip to main content
When you borrow on Bend, your position’s safety depends on your collateral, your debt, and the market’s risk parameters. If you’re building a lending integration, calculating and displaying these metrics clearly is critical.
Bend markets borrow view

Collateral

Collateral is the asset you supply to a lending market to secure your loan. In a $wBERA/$HONEY market, $wBERA is the collateral. It guarantees that the protocol can recover funds if you default. Your collateral is per market—not cross-margined. Supplying collateral does not generate yield.

Loan-to-value (LTV)

LTV measures debt as a share of collateral value. Use it to see how close a position is to liquidation.

How to calculate LTV

Use this formula for a position on Bend: LTV = (BORROWED_AMOUNT / COLLATERAL_VALUE_IN_LOAN_TOKEN) x 100% Where:
  • BORROWED_AMOUNT: Borrowed assets (token base units)
  • COLLATERAL_VALUE_IN_LOAN_TOKEN: Collateral value expressed in the loan token
Collateral value in loan token units: COLLATERAL_VALUE_IN_LOAN_TOKEN = (COLLATERAL_AMOUNT x ORACLE_PRICE) / ORACLE_PRICE_SCALE Where:
  • COLLATERAL_AMOUNT: Collateral supplied (token base units)
  • ORACLE_PRICE: Market oracle price (scaled by ORACLE_PRICE_SCALE)
  • ORACLE_PRICE_SCALE: Protocol scaling factor for prices

Liquidation LTV (LLTV)

Liquidation Loan-to-Value (LLTV) is the maximum LTV before a position can be liquidated. It is fixed per market and set at creation from a governance-approved list. If LTV ≥ LLTV, the position can be liquidated. Example: if a market’s LLTV is 86%, your position is at risk once your LTV reaches or exceeds 86%.

Health factor

Health factor shows how close a position is to liquidation: HEALTH_FACTOR = (COLLATERAL_VALUE_IN_LOAN_TOKEN x LLTV) / BORROWED_AMOUNT
  • LLTV: Market liquidation threshold (e.g. 0.86 for 86%), in WAD (10^18)
Health factor > 1.0 means the position is healthy. Below 1.0, it is eligible for liquidation.

Example: LTV and health factor

Example with assumed values:
  • Borrowed amount: 150 $HONEY (150 × 10^18 base units)
  • Collateral amount: 100 $WBERA (100 × 10^18 base units)
  • Oracle price: 3 $HONEY per $WBERA (3 × 10^18)
  • Oracle price scale: 10^18
  • LLTV: 86% (0.86 × 10^18 WAD)

Step 1 — Collateral value in loan token

Collateral value = 300 $HONEY.
// All calculations use BigInt for precision
const ORACLE_PRICE_SCALE = 10n ** 18n;

const collateralValueInLoanToken =
  (collateralAmount * oraclePrice) / ORACLE_PRICE_SCALE;
// = (100n * 10n**18n * 3n * 10n**18n) / 10n**18n
// = 300n * 10n**18n (300 HONEY in base units)

Step 2 — Current LTV

const WAD = 10n ** 18n;

const borrowedAmount = 150n * 10n ** 18n; // 150 HONEY
const collateralValueInLoanToken = 300n * 10n ** 18n; // 300 HONEY equivalent

const currentLTV = (borrowedAmount * WAD) / collateralValueInLoanToken;
// = (150 * 10^18 * 10^18) / (300 * 10^18)
// = 0.5 * 10^18 (representing 50%)

Step 3 — Health factor

const lltv = 86n * 10n ** 16n; // 0.86 scaled to WAD

const healthFactor = (collateralValueInLoanToken * lltv) / borrowedAmount;
// = (300 * 10^18 * 0.86 * 10^18) / (150 * 10^18)
// = 1.72 * 10^18 (scaled by WAD)

const healthFactorDisplay = Number(healthFactor) / Number(WAD);
// = 1.72
Health factor = 1.72, so the position is healthy with a 72% buffer before liquidation.

Summary

MetricValue
Current LTV50.00%
Max LTV (LLTV)86.00%
Health Factor1.72
StatusHealthy
Liquidation buffer36.00%
$WBERA (18 decimals, 3 $HONEY each) collateral against a $HONEY (18 decimals) loan, using WAD scaling for on-chain math.

Oracles

LTV and health factor depend on the oracle price.
  • Dynamic pricing: The oracle gives the current exchange rate between collateral and loan assets.
  • Oracle design: A market’s oracle can combine several feeds or other on-chain data.
  • Risk: Your LTV and health factor are only as reliable as the oracle. Latency, inaccuracy, or manipulation affect positions.
When you show market data, also show which oracle is used. For details, see Oracle.