@somnia-chain/markets-sdk / index / LendAccount
Interface: LendAccount
Defined in: packages/sdk/src/lend/types.ts:143
A whole SomniaLend account: the Pool's risk aggregate plus every non-empty per-reserve position, in one read.
Details
healthFactor is a wad (1e18): liquidation triggers below 1e18. The *Base
aggregates are denominated in the oracle base currency
(baseCurrencyDecimals, USD/8dp on this deployment).
Gotchas
A debt-free account reports maxUint256 ("infinite") as its healthFactor.
The *Base aggregates are cross-asset totals, not token amounts.
Properties
totalCollateralBase
totalCollateralBase:
bigint
Defined in: packages/sdk/src/lend/types.ts:145
Total collateral backing the account, base-currency units.
totalDebtBase
totalDebtBase:
bigint
Defined in: packages/sdk/src/lend/types.ts:147
Total debt owed, base-currency units.
availableBorrowsBase
availableBorrowsBase:
bigint
Defined in: packages/sdk/src/lend/types.ts:149
Remaining borrowing power, base-currency units.
currentLiquidationThresholdBps
currentLiquidationThresholdBps:
number
Defined in: packages/sdk/src/lend/types.ts:151
Account-weighted liquidation threshold, bps.
ltvBps
ltvBps:
number
Defined in: packages/sdk/src/lend/types.ts:153
Account-weighted max LTV, bps.
healthFactor
healthFactor:
bigint
Defined in: packages/sdk/src/lend/types.ts:155
Health factor, wad (1e18); < 1e18 ⇒ liquidatable; maxUint256 ⇒ no debt.
baseCurrencyDecimals
baseCurrencyDecimals:
number
Defined in: packages/sdk/src/lend/types.ts:157
Decimals of the base currency the *Base fields use.
positions
positions:
LendPosition[]
Defined in: packages/sdk/src/lend/types.ts:159
Every reserve the account holds a supply or debt in (empty rows dropped).