The fillOrder() function lacks a deadline check, allowing buyers to fill orders even after they’ve expired. This breaks expected order behavior, bypasses seller control, and can lead to unauthorized token transfers after the intended expiration time.
Root: Missing or incorrect deadline check in the fillOrder function.
Impact: Sellers are forced to sell tokens at outdated, unfavorable prices, losing control over their assets and potentially incurring financial losses, while also damaging the platform's credibility.
Describe the normal behavior in one or more sentences
Ans:
Under normal behavior, an order should only be fillable before its specified deadline. Once the deadline passes, the order should be considered expired and unfillable by any buyer.
Explain the specific issue or problem in one or more sentences
ans:
The fillOrder() function does not enforce the order's deadline, allowing buyers to fill orders even after they have expired. This violates the intended time constraint and undermines seller control over their listings.
Likelihood:
This will occur any time a buyer calls fillOrder() on an order that has already passed its deadline.
Since the contract doesn’t prevent expired orders from being filled, any buyer can intentionally exploit this if they know the order ID.
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
This will occur whenever a buyer calls fillOrder() on an order whose deadline has already passed, because the function does not validate the current block timestamp against the order’s expiration time.
Reason 2
The contract treats all active orders equally, regardless of whether they are past their deadline, allowing expired orders to remain fillable as long as their status is still marked as Active.
Impact:
Impact 1
Attackers or opportunistic buyers can exploit stale listings to acquire tokens unfairly, leading to reduced trust in the protocol and financial loss.
Impact 2
Sellers may have their tokens purchased after the intended expiration, violating their control and expectations.
The buyer calls fillOrder(orderId) after the deadline, and the order is still processed successfully.
A seller creates an order with a short deadline (e.g., 8,9,10 minutes from now)
The deadline passes without any buyer filling it.
Add a check in the fillOrder() function to ensure that the order cannot be filled after its deadline.
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.