Running a liquidator
Practical setup for an Banq liquidation bot.
What you'll need
- An on-chain account — usually a smart contract you control. Plain EOAs work but contracts give you more flexibility (atomic decision-making, custom slicing).
- Capital deposited as supply — enough that you can absorb liquidation debts without dropping H below 100% yourself.
POOL_SQUARE_ROLE— granted via Acma. Without itsquare()reverts; you can still callliquidate()(the public path) provided the pool itself also holdsPOOL_SQUARE_ROLE(governance's on/off switch for the permissionless path) and you can satisfy the per-partial_expPoW gate.- An off-chain monitor — a process watching positions for H < 100% and submitting transactions when opportunities appear.
- Robust tx submission — most production keepers use private mempools (Flashbots, MEV-Share) to avoid frontrunning.
The decision loop
For each underwater position:
- Pick the slice. Choose an exponent
e(the protocol does not store a default — you pass it on every call).e = 1slices 50%,e = 2slices 25%,e = 0is a full liquidation that closes the position outright. - Estimate the bonus. At the H = 100% boundary with default weights, bonus ≈
0.5 × debt_taken_value. Strictly underwater, the realised bonus is smaller — it tracks the victim's live C/D ratio, not the boundary value. Subtract gas costs. - Check your H post-liquidation. Ensure post-tx H ≥ 100% with margin.
- Submit.
For competitive cases, you may want to bid in a private mempool to win over other keepers.
Sizing your position
A keeper running on a 100k XPOW supply with H ≥ 200% can absorb roughly 50k XPOW of additional debt before dropping to H = 100%. So per-liquidation, you can take on debts up to ~25k XPOW (a 50% slice — e = 1 — with safety margin).
For larger positions, scale up your supply. Or use higher exponents (e = 2 → 25% slice) to fit smaller bites. Because partial liquidation preserves the victim's H, you can repeatedly slice the same underwater position; nothing in the protocol forces you to take it in one bite.
Locked-position absorption
If the victim has locked supply, you receive locked supply tokens — un-redeemable until the lock expires. This affects your real economics:
- You hold debt that accrues interest.
- You hold collateral you can't immediately redeem.
- Your effective return is the bonus minus the carry cost of the locked period.
For long-locked positions, the absorbed value can be negative if you can't sell the locked tokens. Some keepers refuse to liquidate fully-locked positions, leaving them for others.
Failure modes
- Frontrunning. Another keeper sees the same opportunity and lands first. You pay gas for nothing.
- H rebound. The victim's H rises above 100% between your tx submission and inclusion (e.g., due to oracle price update). Your tx reverts.
- Insufficient headroom. Your post-tx H falls below 100%. The protocol rejects.
- Lock economics. You absorb a heavily-locked position and can't recover the bonus on the secondary market.
Where to go next
- Monitoring and tooling — what to watch
- PoW-gated public mode — the alternative path