@somnia-chain/markets-sdk / index / PerpSystemConfig
Interface: PerpSystemConfig
Defined in: packages/sdk/src/perp/system.ts:22
How the perps stack is wired, straight from MarginBank.getSystemConfig.
This is the address book. Every other contract in the plane is reachable from here, so a consumer never hardcodes one per chain — and the bank's own view of them is the authoritative one, since these are the addresses it will actually call.
Properties
marginBank
marginBank:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:24
The MarginBank reporting this config (echoed back).
collateralToken
collateralToken:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:26
The single collateral token every perp market is quoted in.
perpPoolFactory
perpPoolFactory:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:28
The factory that deploys PerpPools.
liquidationEngine
liquidationEngine:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:30
The LiquidationEngine — the PROXY, which is what to call.
insuranceFund
insuranceFund:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:32
The tiered InsuranceFund that absorbs bad debt.
feeRecipient
feeRecipient:
`0x${string}`
Defined in: packages/sdk/src/perp/system.ts:34
Where protocol fees are routed.
maxLeverageLimit
maxLeverageLimit:
number
Defined in: packages/sdk/src/perp/system.ts:36
Protocol-wide ceiling on per-account leverage; clamps a stricter user setting.
fullyWired
fullyWired:
boolean
Defined in: packages/sdk/src/perp/system.ts:48
Whether the factory, liquidation engine and insurance fund are all set.
feeRecipient is NOT part of it, despite sitting in the same struct — the
contract's flag covers three of the five addresses above. A go-live check that
read this as "everything is configured" would sign off a stack whose fee routing
is still unset, so check feeRecipient separately.
False means some part of the stack is half-configured, which is the state in which liquidation or settlement paths degrade silently rather than reverting.