The maximum deadline a seller should be able to set for their token listing is 3 days from the original order creation time, as per MAX_DEADLINE_DURATION.
However, the contract currently only checks that each new deadline duration is within MAX_DEADLINE_DURATION, relative to block.timestamp, not the order's original creation time. This allows sellers to keep an order alive forever by continuously calling amendSellOrder every few days.
Likelihood:
This can happen any time a seller decides to prolong their listing.
Attackers can keep looping amendments and never let the order expire
Impact:
Stale or overpriced orders can persist indefinitely, cluttering the order book.
May result in unrealistic order availability for buyers.
If frontends display active listings based on isActive, they’ll remain visible much longer than intended.
This test shows that a seller can bypass the 3-day maximum deadline rule by repeatedly calling amendSellOrder() with a new 3-day deadline. Since each amendment resets the deadline relative to block.timestamp, the order can stay active indefinitely, defeating the intended time limit.
This mitigation fixes the bug where sellers could extend their order deadline indefinitely by repeatedly calling amendSellOrder(). It adds a createdAt timestamp to each order and ensures that any new deadline never exceeds createdAt + MAX_DEADLINE_DURATION. This enforces a true upper limit on how long an order can stay active, as originally intended.
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.