# Dust orders can block order posting

Partial maker-order fills leave dust below minLimitOrderAmountInBase; matching that dust rounds quoteDelta to zero and reverts ZeroCostTrade, blocking incoming orders.

- Payout: Contest reward
- Severity: high
- Program: GTE
- Credited: montecristo
- Disclosed: 2026-02-05
- Write-up quality: 7/10
- Original: https://code4rena.com/reports/2025-07-gte-spot-clob-and-router#h-02
- Library page: https://bugbountylibrary.com/r/c4%3A2025-07-gte-spot-clob-and-router%3AH-02
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:high tech:solidity technique:source-review vuln:business-logic vuln:dos vuln:precision-loss

**Target:** CLOB order matching contract (clob/CLOB.sol)
**Root cause:** After a partial match, makerOrder.amount is decremented without enforcing minLimitOrderAmountInBase, leaving dust; getQuoteTokenAmount rounds baseAmount*price/baseSize down to zero for tiny base amounts, triggering ZeroCostTrade revert.
**Steps:**
1. Post a maker order; partially match it so remaining amount falls below minLimitOrderAmountInBase but above lotSize (no min check at L847).
2. Dust order remains in book at L847 (orderRemoved false).
3. Incoming taker order matches dust: baseDelta = (matchedBase.min(takerOrder.amount)/lotSize)*lotSize can be as small as lotSize (L819).
4. quoteDelta = baseAmount*price/baseSize rounds to 0 (Book.sol L476).
5. Trade reverts with ZeroCostTrade at L439, blocking the incoming order.
**How found:** Code review of match loop: noticed order removal only on full match (L833) and unchecked decrement (L847), then traced rounding in getQuoteTokenAmount to the ZeroCostTrade guard.
**Exploitation:** Attacker leaves dust maker orders in the book (via partial fills) so subsequent taker orders that match them revert with ZeroCostTrade, griefing/blocking order posting.
**Insight:** In CLOB matching, check post-match remainder against min order size and lot rounding of quote amount; dust below lot/price granularity can zero out quoteDelta and revert trades, a griefing vector.
