In the run function, the flow state is set to SIGNAL_CHNAGE at the beginning of the function execution.
However, the deposit and withdrawal operations that are triggered within the runSwap function, which is called being set to DEPOSIT or WITHDRAW Since the flow is in the SIGNAL_CHANGE state while the deposit or withdrawal operations are executed, the system will become stuck in an inconsistent state. This can potentially block or disrupt the execution of future deposit/withdraw actions, leading to an operational deadlock.
Affected function(s)
run
runSwap
Deposit and Withdrawal functions (through _mint and _handleReturn)
Execute the run function with a condition that triggers deposit or withdrawal (e.g., positionIsClosed or based on the isOpen and isLong flags).`
Observe that the flow state is set to SIGNAL_CHANGE at the beginning of the function.
Performs deposit or withdrawal actions within the runSwap function.
Notice that the flow state remains in SIGNAL_CHANGE. preventing proper completion or further state transitions to DEPOSIT or WITHDRAW.
The flow state remains in SIGNAL_CHANGE which block the deposit or withdrawal operation i.e it becomes unresponsive due to the system being in an intermediate state that blocks further actions.
Operational Blockage: The system will become stuck in the SIGNAL_CHANGE state, preventing further operations from being performed.
Inconsistent State Transaction
Manual Review
Properly Updates State Transition
Example Implementation
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.