uiMultiplier(). The multiplier is display only and never enters risk math. snapshot returns an account’s full picture in one call.
RiskLens lets you:
- Read health, max borrow, and liquidation price
- Read collateral in share-equivalent display units
- Fetch a full account snapshot in one call
The source code is
src/periphery/RiskLens.sol on GitHub. The ABI is /abis/RiskLens.json.
Read methods
health
Stockline.health(account): collateral at the liquidation threshold divided by debt, in WAD.
Input parameters
Return values
maxBorrow
Stockline.maxBorrow(account).
Input parameters
Return values
liquidationPrice
Stockline.liquidationPrice(account, bookId).
Input parameters
Return values
collateralUi
uiMultiplier and divided by 1e18, for display.
Input parameters
Return values
uiMultiplier
uiMultiplier() from a token with a static call. Returns 1e18 if the call fails, returns nothing, or returns 0.
SPEC: read token.uiMultiplier() when present. Missing or zero means 1e18 (1:1).
Return values
snapshot
Reads every held book’s oracle price. Reverts with PriceUnavailable when any held book cannot be priced.
Return values