After an order has been canceled, the intent of the protocol is to let the keeper try the same order action again. However, there's a chance that the order might fail continuously. And since there's no current way of resetting the nextActionthis might keep the system in a stuck state.
If an order has been canceled, the afterOrderCancellation in the PerpetualVault is called, which sets the nextAction.selector and nextAction.data into the right state in order to call the runNextAction() function by the keeper.
However, if the order is a flawed order, meaning that it will, for some reason, never succeed, retrying it will only keep the protocol in a stuck state, blocking all potential actions by users.
To note here is that cancelOrder only partially solves the problem since it does not work on market orders.
Severity: Medium, Likelihood: Low
Manual Review.
Add a keeper function allowing the keeper to manually set the nextAction struct to avoid being stuck.
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.