Inside GmxProxy.sol, the following functions use the transfer function to send ETH:
It is recommended to use the call method instead of transfer, as transfer has gas limitations and may cause issues in certain scenarios.
The transfer function imposes a gas stipend of 2300, which can cause failures if the receiving contract has complex logic. Using call provides more flexibility and reduces the risk of transaction failures.
Potential Transaction Failures: If the recipient contract requires more than 2300 gas, the transfer will fail.
Reduced Flexibility: call allows specifying gas and handling return values, making it a safer alternative.
Manual Code Review
Solidity Static Analysis Tools
call Instead of transferRefactor the functions to use call with proper error handling.
This approach ensures that the transfer does not fail due to gas limitations and allows handling failure cases properly.
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.
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.
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.