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
call{value: balance}("") instead, as it provides flexibility and avoids unexpected failures.recipient address parameter, allowing the owner to withdraw to any address securely.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.