emergencyPause does not cache the previous status; leading to permanent loss of requested but not processed deposit/withdraw.
The protocol make uses of status to clearly define what state the system is in, and what are the pre-requisite for executing a step-wise function to transition the system. For example, to handle the 2-step deposit/withdrawal inherent to GMX, upon deposit, the system would transition to self.status = GMXTypes.Status.Deposit;
. And then a status of Deposit
would be the requirement for the system to call execute processDeposit
, through the afterDepositExecution
callback from the GMX contract entry point executeDeposit
However, during when the system enters paused through emergencyPause
. The system does not cache whatever the status is before transiting to Paused
. And when the system resumes through emergencyResume
and then processEmergencyResume, the status becomes
Open` again.
So if the system was in Deposit
or Withdraw
, it cannot call processDeposit or processWithdraw, leading to a permanent tx stuck.
emergency:
inconsistency in system status leading to a loss of deposit/withdraw prior to emergency pause.
consider a cache of system status and resume after emergency pause.
Impact: High Likelihood: Low/Medium Deposit or withdraw that were in progress will be ignored and cause fund loss. Because emergencyPause is only callable by keepers, Medium is the proper severity.
Impact: High Likelihood: Low/Medium Deposit or withdraw that were in progress will be ignored and cause fund loss. Because emergencyPause is only callable by keepers, Medium is the proper severity.
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.