Brokex Docs
Docs/DEVELOPERS/Keeper Infrastructure

Keeper Infrastructure

OrderExecutor, LongLiquidation, and FifoKeeper workers in DIRECT and PAYMASTER modes.

Backend Indexer & Keeper Execution Pipeline (DIRECT & PAYMASTER Modes)Fastify · SQLite WAL · viem · permissionless
BlockchainIndexerWS watchBlock + 3s HTTP poll32-block reorg rollbackSQLite (WAL Mode)acquireKeeperTxLock()Idempotent tx & state cache3 Automated Workers• OrderExecutorWorker• LongLiquidationWorker• FifoKeeperWorker (batch 25)Allowlist (3 selectors only):executeOrder · liquidateLongprocessWithdrawalsDIRECT Mode (EOA)Serialized nonces + simulateContractBase L1 + L2 gas budget guardPAYMASTER Mode (ERC-4337)Coinbase Smart Account v1.1CDP Paymaster & Bundler UserOps

Both DIRECT (EOA with serialized nonces and L1/L2 gas guards) and PAYMASTER (Coinbase Smart Account v1.1 + CDP Bundler/Paymaster) execution modes are implemented in src/keeper/, strictly allowlisted to BrokexRouter.executeOrder, LongManager.liquidateLong, and BrokexVault.processWithdrawals.