Paboxo

Position health

Collateral and borrow value, LTV against liquidation threshold, health factor, max borrow, liquidation price and the withdraw limit.

The narrative is on how it works. Try the numbers first:

Position health calculator
Market

LTV 60% · liquidation threshold 65% · bonus 8% · borrow APR 0.500%

USD
USDG
Not liquidatable
Health factor
1.2253
Collateral value
$4,528.62
Max borrow (LTV)
2,717.17 USDG
Room to borrow
314.88 USDG
Liquidation price
$184.79
Drop to liquidation
18.39%
Bad debt if fully liquidated below
$129.72
Withdrawable NVDA
2.317679
Collateral price scale: current price 226.43, liquidation price 184.79, full liquidation leaves bad debt below 129.72.
bad debt below $129.72liquidation $184.79price now $226.43
Parameters as read on mainnet 4663 at block 86868761 (12 Oct 2026). USDG is priced at $1. The contracts compute with integers and round each step down (IsHealthy), so on-chain values can differ in the last base unit. Days of interest use the market's borrow APR at that block. This is an illustration of the formulas, not a quote.

Values in USD

Health checks convert both sides to USD scaled by 101810^{18}, rounding down at every step:

p^=⌊p⋅101810do⌋,CV=⌊q p^c10dc⌋,BV=⌊d p^b10db⌋\hat p = \left\lfloor \frac{p \cdot 10^{18}}{10^{d_o}} \right\rfloor, \qquad CV = \left\lfloor \frac{q\,\hat p_c}{10^{d_c}} \right\rfloor, \qquad BV = \left\lfloor \frac{d\,\hat p_b}{10^{d_b}} \right\rfloor MLTV=⌊CV⋅LTV1018⌋,MLT=⌊CV⋅LT1018⌋M_{\text{LTV}} = \left\lfloor \frac{CV \cdot \text{LTV}}{10^{18}} \right\rfloor, \qquad M_{\text{LT}} = \left\lfloor \frac{CV \cdot \text{LT}}{10^{18}} \right\rfloor

Where:

  • pp — the oracle price, with do=8d_o = 8 decimals; p^\hat p is USD per whole token × 101810^{18}.
  • qq — the collateral in the Position, Position.totalCollateral(), with dcd_c decimals (18). A Position holds its market's collateral token and nothing else.
  • dd — the borrower's debt, ⌊s⋅TBA/TBS⌋\lfloor s \cdot \text{TBA} / \text{TBS} \rfloor (shares), with dbd_b decimals (USDG: 6).
  • LTV\text{LTV}, LT\text{LT} — loan-to-value and liquidation threshold, WAD.
  • MLTVM_{\text{LTV}}, MLTM_{\text{LT}} — the most debt value the collateral supports for borrowing, and before liquidation.

Source: IsHealthy · 0x9259…F9a1. Prices come from the TokenDataStream. It keeps serving the last price while the market is closed, so health can be computed over a weekend, and it reverts in the fault states (stale in session, past the hard cap, paused, invalid) — see oracles and market hours.

Two limits

A borrow, or a collateral withdrawal from a Position with debt, must leave

BV≤MLTVBV \le M_{\text{LTV}}

or it reverts ExceedsMaxLTV (IsHealthy · 0x9259…F9a1). Both checks use the debt after accrual. With no debt, the check passes.

A position is liquidatable when

BV>MLTBV > M_{\text{LT}}

strictly (IsHealthy · 0x9259…F9a1). A position exactly at the threshold is not liquidatable. Because LTV≤LT\text{LTV} \le \text{LT} is enforced at market creation, a position that just borrowed can never be liquidatable in the same transaction.

Health factor

The contracts do not compute a health factor. The usual one is

HF=MLTBV=q⋅Pc⋅LTd⋅PbHF = \frac{M_{\text{LT}}}{BV} = \frac{q \cdot P_c \cdot \text{LT}}{d \cdot P_b}

with PP in USD per whole token. Liquidatable exactly when HF<1HF < 1. With no debt, HF is unbounded.

Max borrow

dmax⁡=⌊MLTV⋅10dbp^b⌋,room=dmax⁡−dd_{\max} = \left\lfloor \frac{M_{\text{LTV}} \cdot 10^{d_b}}{\hat p_b} \right\rfloor, \qquad \text{room} = d_{\max} - d

A new borrow also has to pass the market's max utilisation (100%: the vault cannot be lent out entirely) and, if set, its borrow cap; neither binds for the position in the example below. Debt keeps growing between the moment you read it and the moment a transaction lands, so borrowing the whole room can revert — leave a margin.

Liquidation price

The collateral price at which HF=1HF = 1:

Pcliq=d⋅Pbq⋅LT(liquidatable when Pc<Pcliq)P^{\text{liq}}_c = \frac{d \cdot P_b}{q \cdot \text{LT}} \qquad\text{(liquidatable when } P_c < P^{\text{liq}}_c\text{)}

The contracts have no such function; it is derived from the inequality above. The distance to it is 1−Pcliq/Pc1 - P^{\text{liq}}_c / P_c. A position borrowed right up to its LTV sits 1−LTV/LT1 - \text{LTV}/\text{LT} above its liquidation price: 7.7% for NVDA/USDG, 6.7% for SPY/USDG, 6.25% for WETH/USDG, 10% for SPCX/USDG, TSLA/USDG and AMD/USDG, 7.1% for QQQ/USDG; MSFT/USDG, AAPL/USDG and GOOGL/USDG are NVDA/USDG's 7.7%.

A second price matters to lenders: below

Pcbad=d⋅Pb⋅(1+b)qP^{\text{bad}}_c = \frac{d \cdot P_b \cdot (1 + b)}{q}

a full liquidation takes all the collateral and still leaves debt — see bad debt.

Withdraw limit

With debt, the collateral left behind must still satisfy the LTV limit (not the liquidation threshold):

qmin⁡′=⌈BV⋅10dc⋅1018p^c⋅LTV⌉q'_{\min} = \left\lceil \frac{BV \cdot 10^{d_c} \cdot 10^{18}}{\hat p_c \cdot \text{LTV}} \right\rceil

and, on every market, the withdrawal needs Fresh prices while the Position has debt — see market hours. With no debt, all collateral can be withdrawn at any time. Source: Position, LendingPoolRouter.

Worked example

The illustrative Position on NVDA/USDG: 20 NVDA collateral and 2400000000 borrow shares, with TBA=\text{TBA} = 20010000000 and TBS=\text{TBS} = 20000000000. NVDA at $226.43088402, its mainnet price at block 86868761; USDG at $1. The amounts are illustrative; the price and parameters are mainnet's.

RawHuman
qq2000000000000000000020 NVDA
p^c\hat p_c226430884020000000000$226.43088402
CVCV4528617680400000000000$4,528.6176804
MLTVM_{\text{LTV}} (60%)2717170608240000000000$2,717.17060824
MLTM_{\text{LT}} (65%)2943601492260000000000$2,943.60149226
dd, stored totals⌊2400000000×20010000000/20000000000⌋=\lfloor 2400000000 \times 20010000000 / 20000000000 \rfloor = 24012000002,401.200000 USDG
dd, after pending interest⌊2400000000×20019117741/20000000000⌋=\lfloor 2400000000 \times 20019117741 / 20000000000 \rfloor = 24022941282,402.294128 USDG

The second row books the market's pending 9.117741 USDG of interest from accrual first, as every check does. With that debt:

Value
Health factor2943.60149226/2402.294128=1.225332943.60149226 / 2402.294128 = 1.22533 (1.22589 on stored totals)
Room to borrow2717.170608−2402.294128=314.8764802717.170608 - 2402.294128 = 314.876480 USDG
Liquidation price2402.294128/(20×0.65)=$184.792402.294128 / (20 \times 0.65) = \$184.79, an 18.39% fall from $226.43
Bad-debt price2402.294128×1.08/20=$129.722402.294128 \times 1.08 / 20 = \$129.72
qmin⁡′q'_{\min}17682320872416945779, 17.682320 NVDA
Withdrawable2.317679 NVDA

The calculator above starts at these inputs.

On this page