A DOS can be executed on the vault by a user using a malicious contract.
The function GMXWithdraw#processWithdraw
attempts to perform a native ETH transfer if WETH is the token meant to be withdrawn:
The call will revert if the target/user is a smart contract without receive or fallback functions. Since the transfer happens in the post-execution block after the try
it will not be caught and handled by the catch
block. This can be used to create a malicious contract that is able to create deposits and call withdraw from the GMXVault, but does not allow the ETH transfer to complete.
The vault will be stuck in status Withdraw
. While the GMXVault can be opened through the pause-resume flow, a malicious actor can perform the same attack again any time.
Manual Review
Instead of sending native token to the user, send the wrapped asset instead.
Impact: High Likelihood: High An attacker can repeatedly force the protocol to get stuck in a not-open status. This can happen on both deposit, withdraw callback for both successful execution and failures. Will group all similar issues.
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.