If an address is unable to receive ETH, the Protocol will remain in either a 'Deposit` state until a keeper intervention.
The issue lies in the fact that processDepositCancellation
aims to send back ETH to the initiator of the deposit, but this might not be possible if the initiator of the depositNative
function is a contract that cannot receive ETH.
This will cause the contract to be stuck in Deposit
status.
If a malicious user observes that GMX lacks the necessary supply to fulfill a deposit or detects the occurrence of a processDepositCancellation event, they might exploit the situation by initiating a depositNative
operation through a contract that doesn't have a way of receiving eth. It's highly likely that this operation will trigger the processDepositCancellation function. In such a scenario, the ETH cannot be returned to the contract, ultimately leading to a failed ETH transfer to the contract that initiated depositNative
function, consequently, causing DoS, because we the protocol cannot exit the Deposit
Status.
This would be would be a exploit execution:
Jack deposit funds through this CreateDepositContract
contract to the steadify protocol.
The GMX protocol reverts the transaction.
Steadify tries to send eth back to CreateDepositContract
contract but reverts each time, since the CreateDepositContract
cannot accept ETH.
The steadify protocol is now stuck in a Deposit
State
This kind of contract could be use the trigger the system's DoS state.
Executing this type of attack is relatively inexpensive ( 0.09 USD + executionFee ) and will result in the protocol being immobilized until the protocol's keeper intervenes. A medium severity impact grade is therefore attributed, since there is a DoS risk.
Manual review
One way to mitigate this would be to send back WNT to the user instead of ETH to the user.
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.