API ReferenceVaults, collateral, and riskFunction
isInsufficientSentinel()
function isInsufficientSentinel(basisPoints): boolean;Whether basisPoints is the UINT16_MAX_BASIS_POINTS
marker rather than a real percentage.
Parameters
| Parameter | Type | Description |
|---|---|---|
basisPoints | number | A collateral-factor or uncapped risk-factor value in basis points. |
Returns
boolean
true when the value is the sentinel marker and must not be displayed as a number.
Remarks
Only meaningful for uncapped results — a
calculateCollateralFactorBasisPoints return value, or a
calculateRiskFactorBasisPoints call with
maxOneHundredPercent: false.
Even there it is not a complete test of an uncapped risk factor. Only the zero-liquidation-factor
exit returns this value verbatim. When the collateral value floors to zero instead,
calculateCollateralFactorBasisPoints returns the sentinel
and calculateRiskFactorBasisPoints then divides it by the
liquidation factor, yielding floor(65535 * 10000 / liquidationFactor) — 81918 at a liquidation
factor of 8000, which this predicate does not match. The two coincide only when the liquidation
factor is exactly 10000. For an uncapped value, treat anything at or above 10000 as insufficient
rather than relying on this predicate alone. The default capped path (every SDK React hook) never
produces this raw value; see UINT16_MAX_BASIS_POINTS
for how to gate a capped result instead.