API ReferenceVaults, collateral, and riskVariable
UINT16\_MAX\_BASIS\_POINTS
const UINT16_MAX_BASIS_POINTS: 65535 = 65_535;The contract stores collateral factors as uint16; type(uint16).max doubles as its “no measurable collateral value” sentinel and its overflow cap.
Remarks
This is a MARKER, never a percentage: it means “this position’s collateral factor could not be measured (or overflowed uint16) — treat it as insufficient/indeterminate,” not “6553.5% collateralized.” Consumers must never format it as a number (percentage, price, gauge fill); render the insufficient/indeterminate state instead.
Whether a caller can literally see this raw value depends on how it calls calculateRiskFactorBasisPoints:
- Uncapped (
maxOneHundredPercent: false): the raw sentinel can come back directly. Gate on isInsufficientSentinel. - Capped (
maxOneHundredPercent: true, the default — every SDK React hook uses this path): the sentinel is folded into the 10_000 (100%) cap before it ever reaches a caller, so isInsufficientSentinel will never match. Gate ongetRiskLevel(riskFactorBasisPoints) === 'insufficient'instead — it catches both this indeterminate case and a position that is genuinely at or past its liquidation threshold, which collapse to the same capped value and cannot be told apart numerically after capping.