In the _createIncreasePoaition() function the _gmxLock flag is set to true when creating an order via GMX but is never reset to false after execution.
This creates a deadlock where future GMX operations (such as opening, closing, or modifying positions) can never be executed, effectively breaking all trading functionality.
Issue in _createIncreasePosition()
But it is important for both success and failure scenarios of createOrder
Additionally, it must be reset (_gmxLock = false) once the order is completed, or new orders will be blocked indefinitely.
Same issue in _createDecreasePosition, settle() and some other functions
No further GMX orders can be placed after the first one if _gmxLock remains true.
Users could get stuck in positions, unable to withdraw or adjust their trades.
Protocol operations relying on GMX orders (e.g., liquidations, rebalances) may fail indefinitely.
Manual Review
Reset _gmxLock in a callback after execution:
Example implementation
Ensure _gmxLock resets if createOrder() fails immediately:
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.