@somnia-chain/markets-sdk


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

Variable: liquidationEngineEventsAbi

const liquidationEngineEventsAbi: readonly [{ type: "event"; name: "AccountLiquidated"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "positionsProcessed"; type: "uint256"; indexed: false; }, { name: "stageReached"; type: "uint8"; indexed: false; }, { name: "marginStatusBefore"; type: "uint8"; indexed: false; }, { name: "marginStatusAfter"; type: "uint8"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "PositionLiquidated"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "perpPool"; type: "address"; indexed: true; }, { name: "sizeDelta"; type: "int128"; indexed: false; }, { name: "markPrice"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "PositionSkippedBelowMinQuantity"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "perpPool"; type: "address"; indexed: true; }, { name: "size"; type: "int128"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "PositionTakenOver"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "bidder"; type: "address"; indexed: true; }, { name: "perpPool"; type: "address"; indexed: true; }, { name: "size"; type: "int128"; indexed: false; }, { name: "takeoverPrice"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "LiquidationFeeCharged"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "perpPool"; type: "address"; indexed: true; }, { name: "tier"; type: "uint256"; indexed: true; }, { name: "fillNotional"; type: "uint256"; indexed: false; }, { name: "amount"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "LiquidationKeeperRewardPaid"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "keeper"; type: "address"; indexed: true; }, { name: "amount"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "LiquidationThrottled"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "perpPool"; type: "address"; indexed: true; }, { name: "blockVolume"; type: "uint256"; indexed: false; }, { name: "volumeCap"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "ResidualBadDebt"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "residual"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "ResidualBackedByOpenPnl"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "residual"; type: "uint256"; indexed: false; }, { name: "equity"; type: "int256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "CoverageDeclinedByEquityCap"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "declined"; type: "uint256"; indexed: false; }, { name: "tiers"; type: "uint256[]"; indexed: false; }, { name: "losses"; type: "uint256[]"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "AdlCapacityShortfall"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "perpPool"; type: "address"; indexed: true; }, { name: "residualSize"; type: "uint128"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "AdlPriceCapacityExhausted"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "residual"; type: "uint256"; indexed: false; }]; anonymous: false; }, { type: "event"; name: "AdlSessionDiscarded"; inputs: readonly [{ name: "account"; type: "address"; indexed: true; }, { name: "absorbed"; type: "uint256"; indexed: false; }, { name: "reason"; type: "uint8"; indexed: true; }]; anonymous: false; }]

Defined in: packages/sdk/src/eventsAbi.ts:468

LiquidationEngine events — the liquidation waterfall. Also a singleton, and the waterfall is SPLIT with MarginBank: the engine emits the stages and their costs, while the settlement legs (AutoDeleveraged, CloseOutMarginSettled, BadDebtAbsorbed, PositionTransferred) land on marginBankEventsAbi above. A consumer that wants the whole story needs both ABIs.

Account-level events carry NO pool: AccountLiquidated covers every position the stage walked, and the residual/ADL-shortfall events describe the account's hole. Only the per-position events are pool-scoped, which is why a per-pool liquidation filter is lossy.

Owner-parameter *Updated events, bidder registration, and the scan-progress checkpoints (AdlScanCheckpointed, AdlNoBadDebtToSocialize) are out: they are keeper mechanics, not account outcomes.

Generated from indexer/abis/LiquidationEngine.json and pinned by topic0 in test/perpEventsAbi.test.ts.