Liquidations without the keeper race
By zKmex Team
The classic liquidation design is a race: keeper bots watch the chain, spot an underwater account, and fight each other to land the liquidation transaction first. It works, but it leaks value to gas wars and leaves windows where bad debt accrues.
zKmex folds liquidations into the matching engine. Each block, after the match, a GPU-parallel risk pass scans every open position against its maintenance margin. Accounts below the line are liquidated atomically in the same commit — no separate transaction, no mempool to snipe.
Because the scan is parallel, checking ten positions costs essentially the same as checking ten thousand. The book stays solvent through fast moves, and the insurance fund only has to cover the residual gap between the liquidation price and the actual fill.
The liquidation flow — scanning, underwater, pending, settled — is steppable in the app. Push a position past maintenance and watch the engine take it down.
Want to see it run? Open the playground →