# Liquidation stalls when top-of-book is outside divergence band (STANDARD & BACKSTOP), allowing under-margined positions to persist

GTE perps liquidation reverts when top-of-book quotes sit outside the divergence band, blocking reduce-only IOC fills on both STANDARD and BACKSTOP books, letting under-margined positions persist.

- Payout: Contest reward
- Severity: medium
- Program: GTE
- Credited: 4Nescient
- Disclosed: 2026-02-05
- Write-up quality: 6/10
- Original: https://code4rena.com/reports/2025-08-gte-perps-and-launchpad#m-06
- Library page: https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-06
- Tags: domain:web3 impact:dos impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:dos vuln:liquidation

**Target:** Perps CLOB matching engine (CLOBLib liquidation path)
**Root cause:** The divergence-band gate in _matchIncomingBid/_matchIncomingAsk breaks the matching loop when best quote is outside mark±cap, so a reduce-only IOC liquidation order fills nothing and reverts with ZeroOrder(). The same gate is applied to the BACKSTOP book, whose purpose is risk reduction rather than price protection.
**Steps:**
1. Observe liquidation submits reduce-only IOC via Market.liquidate().
2. For long liquidation (SELL into bids), matcher requires bestBid >= mark*(1-cap); if all bids are below, `if (bestBid < minBid) break;` halts matching.
3. For short liquidation (BUY into asks), matcher requires bestAsk <= mark*(1+cap); if all asks above, `if (bestAsk > maxAsk) break;` halts matching.
4. With no in-band quotes, IOC order fills zero, returns zero effect, and liquidation reverts with ZeroOrder().
5. Repeat on BACKSTOP book: same gate applies, so backstop also refuses to fill.
6. Position remains under-margined, accrues losses toward bad debt.
**How found:** Code review of CLOBLib matching loops: noticed the divergence-band break conditions are shared identically between STANDARD and BACKSTOP books, and reasoned that BACKSTOP's risk-reduction role conflicts with a price-protection gate that halts matching exactly when in-band liquidity is absent.
**Exploitation:** No capital or special quote needed: in thin/volatile markets market makers widen or pull in-band quotes, leaving only out-of-band quotes on the relevant side. Liquidation then reverts on both STANDARD and BACKSTOP, so the under-margined account persists, losses escalate to negative equity, hitting the Insurance Fund and potentially triggering ADL on solvent traders.
**Escalation:** Losses accumulate into bad debt; Insurance Fund depletion can cascade to auto-deleveraging of solvent traders system-wide.
**Insight:** When a matching engine applies slippage/divergence guards, check whether the same guard is reused on a fallback/backstop venue whose purpose is risk reduction—guards that halt matching on out-of-band top-of-book can convert a price-protection feature into a liquidation DoS precisely during stress.
