Normal behavior: When an order is created, its deadline should expire no later than createdAt + MAX_DEADLINE_DURATION, and once that window has passed it should not be extendable.
Root cause: The amendSellOrder function recomputes expiry as block.timestamp + _newDeadlineDuration without ever recording the original creation timestamp (createdAt) or enforcing a cap relative to it. This allows a seller to call amendSellOrder immediately before each expiry and push the deadline out by another full window indefinitely.
Likelihood:
A seller or automated script simply invokes amendSellOrder right before expiry to refresh the deadline, and can repeat this indefinitely.
Unmonitored orders remain “active” as long as the seller keeps refreshing them.
Impact:
Locked-up assets: Tokens committed to the order stay locked in the contract forever, preventing both the seller and buyers from reclaiming or trading them.
Market distortion & UX confusion: Buyers and analytics will continue to see “active” orders past their intended lifespan, undermining trust in the protocol.
Because there’s no cap tied to the original creation time, a seller can “refresh” the deadline over and over, locking funds indefinitely.
Track creation time by adding a createdAt field to the Order struct and setting it in createSellOrder.
Enforce a hard cap relative to that timestamp in amendSellOrder:
For a reference implementation of this fix, see the official patch here:
https://github.com/CodeHawks-Contests/2025-07-orderbook/commit/45fbb9293df017a84c42cdd3e07c3e99d5409816
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.