The contract is designed to prevent execution of expired orders by checking block.timestamp >= order.deadlineTimestamp
during buy operations, ensuring expired orders cannot be filled.
Expired orders remain permanently stored in the contract's state, accumulating over time and increasing gas costs for operations that iterate through or query order data, while providing no functional value to the protocol.
Likelihood:
As users create sell orders with varying deadline durations, many naturally expire due to shifting market dynamics or user inaction.
As the protocol scales and handles thousands of orders daily, a substantial fraction remains unfilled and uncanceled.
Over time, this leads to linear growth in storage costs, driven by the accumulation of expired, inactive order data in contract state.
Impact:
As the number of expired orders accumulates, gas costs for view functions and order queries grow proportionally, impacting contract efficiency.
The resulting storage bloat degrades the user experience by making order browsing and interaction slower and less responsive.
Additionally, sellers’ tokens remain locked in these expired orders until manually canceled, leading to diminished capital efficiency across the protocol.
Implement an automatic cleanup mechanism or incentivize users to clean up expired orders.
By design only `seller` can call `cancelSellOrder()` on their `order`. But when an `order` expires, and the `seller` doesn't have access to the protocol, the expired `order `should be be able to be cancelled by an `admin`.
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.