The endGame
function utilizes the transfer
method to send ETH to the winner. The transfer()
function was commonly used in earlier versions of Solidity for its simplicity and automatic reentrancy protection. However, it was identified as potentially problematic due to its fixed gas limit of 2300
.
The transfer
method sends a fixed amount of 2300 gas to the recipient, which is typically sufficient only for simple ETH transfers. If the recipient is a contract that requires more gas to process the incoming ETH (e.g., due to fallback functions or complex logic), the transfer
will fail, reverting the entire transaction.
If the transfer
fails, the entire prize distribution
process is reverted, leaving the player without reward .
Manual code review.
Utilize the call
method to send ETH, allowing for dynamic gas management and better handling of transfer outcomes.
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.