@somnia-chain/markets-sdk / index / InsuranceFundState
Interface: InsuranceFundState
Defined in: packages/sdk/src/perp/system.ts:67
The InsuranceFund's solvency picture.
Properties
address
address:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:71
The fund's address.
maxTiers
maxTiers:
bigint
Defined in: packages/sdk/src/perp/system.ts:76
The maximum tier INDEX, not a count — the fund has maxTiers + 1 addressable
buckets, because tier 0 exists alongside coverage tiers 1..maxTiers.
totalBalance
totalBalance:
bigint
Defined in: packages/sdk/src/perp/system.ts:90
Sum across every tier including tier 0, raw collateral units — the contract's own
getTotalTierBalances, which is the figure the INV-TIER accounting invariant is
stated against.
Not "how much bad debt this stack can absorb", on two counts. Tier 0 is
included here but never absorbs anything, so collateral parked there inflates the
number without backing a single market. And each coverage tier is charged only
its own pools' realized losses, capped at min(funded, own loss) and never
subsidising another tier — so even the 1..maxTiers sum is an upper bound that
no single event can draw down in full. For absorption against a specific market,
read that market's tier from tiers.
tiers
tiers:
InsuranceFundTier[]
Defined in: packages/sdk/src/perp/system.ts:92
Per-tier balances and how many pools each backs, tier 0 first.