> ## Documentation Index
> Fetch the complete documentation index at: https://docs.berachain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collateral, LTV & Health

> Collateral and debt relationship, LTV formula, health factor, and liquidation thresholds in Bend markets.

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.

<Frame>
  <img src="https://mintcdn.com/berachain-422fce37/spFyXF2YSQlNtmpH/images/bend/market-ltv.png?fit=max&auto=format&n=spFyXF2YSQlNtmpH&q=85&s=2388799ad729037c0714b476456827c4" alt="Bend markets borrow view" width="3356" height="2176" data-path="images/bend/market-ltv.png" />
</Frame>

## 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`.

```javascript theme={null}
// 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

```javascript theme={null}
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

```javascript theme={null}
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

| Metric             | Value   |
| ------------------ | ------- |
| Current LTV        | 50.00%  |
| Max LTV (LLTV)     | 86.00%  |
| Health Factor      | 1.72    |
| Status             | Healthy |
| Liquidation buffer | 36.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](/bend/learn/oracle).
