DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Unsafe ETH Withdrawal Implementation in GmxProxy contract

Summary

The function uses transfer(), which imposes a 2300 gas limit. This can break withdrawals if the recipient is a smart contract with higher execution costs.

Currently, the function only allows withdrawals to the contract owner (msg.sender). This limits flexibility in cases where funds need to be sent to another address.

Tools Used

manual review

Recommendations
Use call{value: balance}("") instead, as it provides flexibility and avoids unexpected failures.

Modify the function to accept a recipient address parameter, allowing the owner to withdraw to any address securely.

Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Users mistake, only impacting themselves.

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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