There is no deadline associated with order creation for all types of orders. Hence an order creation transaction not executed immediately due to reasons like sudden spike in gas cost, could get carried out at significantly different market condition in the future, unless the user explicitly invalidates this transaction. Since shorts only occur at near the oracle price, this issue is less significant for short orders.
Example Scenario:
Current price of USDC is 0.6
User creates a bid at 0.58 and sends the tx
Due to spike in gas fees, user's tx doesn't get included in blocks for 2hrs
MATIC price drops to 0.5
User doesn't want to go ahead with the bid. To cancel the bid, the user is forced to make a possibly useless transaction with a high gas price.
The user might have to spend and monitor more in cancelling the order than getting cancelled with the deadline check
The user could end up conceding a bad trade.
Manual Review
Add a deadline parameter for createBid
and createAsk
functions.
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.