@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / PerpRiskParams

Interface: PerpRiskParams

Defined in: packages/sdk/src/perp/margin.ts:139

A perp market's RISK CONFIG — the static parameters frozen on the pool, read straight from getPerpPoolParameters. Never reverts, so this is the dependable source for maintenance margin even when the mark feed is down.

All bps values are standard basis points (100 = 1%) EXCEPT the two fee fields, which are bps × 1000 (the pool's own unit — 1500 = 1.5 bps = 0.015%).

Properties

initialMarginBps

initialMarginBps: bigint

Defined in: packages/sdk/src/perp/margin.ts:146

The initial-margin curve's FLOOR, bps — not necessarily what an order is charged. When dynamic IMF is enabled the pool scales this up with open interest; read effectiveImfBps off PerpHealthSnapshot for the rate actually in force. Equal to the effective IMF only when dynamic IMF is off.


maintenanceMarginBps

maintenanceMarginBps: bigint

Defined in: packages/sdk/src/perp/margin.ts:153

Maintenance-margin threshold, bps — the level below which a position is liquidatable. Unlike initial margin this does not scale with open interest, deliberately: the liquidation threshold must not move under a position because the market's OI grew.


closeOutMarginBps

closeOutMarginBps: bigint

Defined in: packages/sdk/src/perp/margin.ts:155

Close-out / takeover threshold, bps. Strictly below maintenance.


maxOpenInterest

maxOpenInterest: bigint

Defined in: packages/sdk/src/perp/margin.ts:157

Market-wide open-interest cap, raw base units.


maxPositionSize

maxPositionSize: bigint

Defined in: packages/sdk/src/perp/margin.ts:159

Per-position size cap, raw base units.


takerFeeBpsTimes1k

takerFeeBpsTimes1k: bigint

Defined in: packages/sdk/src/perp/margin.ts:161

Taker fee, bps × 1000.


makerFeeBpsTimes1k

makerFeeBpsTimes1k: bigint

Defined in: packages/sdk/src/perp/margin.ts:163

Maker fee, bps × 1000 — SIGNED, because a negative value is a maker rebate.


insuranceFundShareBps

insuranceFundShareBps: bigint

Defined in: packages/sdk/src/perp/margin.ts:165

Share of collected fees routed to the Insurance Fund, bps.