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.
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.
Manual Review
Impact: High Likelihood: Low
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.