All sell orders have an expiration timestamp. Once this expiration timestamp is passed, amendment and purchase of these orders ar enot permitted.
However, there are no functions to deactivate order and return the locked tokens to the seller for the concerned order. Only the user can manually call cancelOrder()
to deactivate the order and claim locked tokens
Likelihood:
Whenever an order expires without getting bought
Impact:
Tokens are locked and have to be manually claimed through cancelOrder()
, which can be done only by user
Place the following function into test/TestOrderBook.t.sol
and run with forge test --mt test_expiredOrders
The test passes, showing that the issue is indeed real.
Add a sweepExpiredOrder()
function to clean up expired orders and return the tokens to users. This function may be triggered by a centralised entity
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.