Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: medium
Invalid

`beforeProcessWithdrawCancellationChecks()` does not check for edge case in GMX

Summary

GMXChecks.sol::beforeProcessWithdrawCancellationChecks() fails to consider GMX edge case.

Vulnerability Details

In integrating Protocol (GMX) there exists a request withdrawal cancellation period for a few blocks where withdrawal requests cannot be cancelled.
The check GMXChecks.beforeProcessWithdrawCancellationChecks(self); is insufficent and only checks if status is Withdraw. see check below:

function beforeProcessWithdrawCancellationChecks(
GMXTypes.Store storage self
) external view {
if (self.status != GMXTypes.Status.Withdraw)
revert Errors.NotAllowedInCurrentVaultStatus();
}```
This check is insufficient and doesnt handle edge case.
## Impact
A User who requests withdrawal cancellation may experience unexpected behaviour.
## Tools Used
Manual review
## Recommendations
1. Include a check for this edge case in `beforeProcessWithdrawCancellationChecks()` that considers this edge case.
2. Or wrap the function `processWithdrawCancellation()` in a try-catch method.
Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.