Steadefi

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

Deposit Vault's status might be permanently set to Status.Deposit

Vulnerability Details

In GMXDeposit.sol:213, there is a risk associated with interactions involving ERC777 tokens. When processing the cancellation of a deposit the GMXDeposit contract employs the safeTransfer and safeTransferFrom functions to return the tokens the user tried to deposit, functions that will revert if the transfers are not successful. The vulnerability specifically arises when a vault that permits ERC777 tokens is established by the owner. Given that ERC777 tokens employ hooks to notify other contracts upon token receipt, a malicious contract could be engineered to revert any attempts by the vault to send tokens upon withdrawal. This could result in the vault's status being permanently set to GMXTypes.Status.Deposit, effectively freezing its operations.

Impact

Although the risk is considered low, as it relies on protocol owners to inadvertently create a vulnerable vault, the potential impact is significant if such a situation were to occur. Therefore, it is important to be aware regarding this issue.

Tools Used

Manual Review

Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

DOS for the tokens with a blacklist

Impact: High Likelihood: Low

Support

FAQs

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