The GMXdeposit.sol:processDepositCancellation function is vulnerable to a stuck state if interacting with a contract without receive or fallback function or where these functions revert. This can effectively grind down the whole protocol.
A malicious/naive user can deploy a contract without a fallback function. This will cause the send-native-tokens code to always fail trapping the whole protocol into an unused state.
POS- deploy this contract
Add this test under test/gmx/local/GMXDepositNeutralVaultTest.t.sol:
Run the test as:
Test results:
Protocol can grind to a halt and become unusable.
Manual review
Send native token via the native tokens contract eg WETH.
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.