Reproduced Exploit

GTE CLOB — amend bypasses maxLimitsPerTx

1. postLimitOrder enforces maxLimitsPerTx via incrementLimitsPlaced. 2. amend to a new price creates a new book position without incrementing. 3. Attacker posts up to the cap, then amends unlimited times in one tx. 4. HARM: order-book flooding / DOS protection bypass.

Jul 2025Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Jul 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 64871-h-03-dos-attack-via-order-amendment-bypassing-maxlimitspertx. Standalone Foundry PoC and full write-up: 64871-h-03-dos-attack-via-order-amendment-bypassing-maxlimitspertx_exp in the evm-hack-registry mirror.


Vulnerability classes: dos-resistance · temporary · account-ownership

Reproduction: self-contained Foundry PoC with only forge-std. Full trace: output.txt. PoC: test/64871-h-03-dos-attack-via-order-amendment-bypassing-maxlimitspertx_exp.sol.

AuditVault taxonomy: lang/solidity · platform/code4rena · has/github · has/poc · severity/high · sector/dex · genome: dos-resistance · temporary · frozen-funds


Key info#

ImpactHIGH — unlimited price-level churn per tx; DOS protection bypass
ProtocolGTE CLOB
Vulnerable codeCLOB.amend missing incrementLimitsPlaced
Bug classIncomplete rate-limit on book mutations
FindingCode4rena 2025-07 GTE · #64871 · H-03 · eightzerofour
ReportCode4rena report
SourceAuditVault
Compiler^0.8.24 (PoC)

TL;DR#

  1. postLimitOrder enforces maxLimitsPerTx via incrementLimitsPlaced.
  2. amend to a new price creates a new book position without incrementing.
  3. Attacker posts up to the cap, then amends unlimited times in one tx.
  4. HARM: order-book flooding / DOS protection bypass.

The vulnerable code#

SOLIDITY
function amend(...) external {
    // @> VULN: no incrementLimitsPlaced when price/side changes
    return _processAmend(ds, order, args);
}

Fix: call incrementLimitsPlaced when price or side changes.


Root cause#

Amend-to-new-price is operationally a new limit placement but not rate-limited.


Preconditions#

  • Ability to post at least one limit order.
  • maxLimitsPerTx configured (DOS guard present).

Attack walkthrough#

  1. Post maxLimitsPerTx orders (third post reverts).
  2. Amend first order across 50 prices in the same tx.
  3. Limits counter stays at 2; book sees 50 new levels.

Diagrams#

flowchart TD P["postLimitOrder increments limit"] --> Cap["maxLimitsPerTx reached"] Cap --> A["amend to new prices unlimited"] A --> Flood["Order book flooded"]

Impact#

Bypasses the protocol's per-tx order-book spam protection.


Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.