The current implementation of the payment logic in the endGame function uses transfer to send Ether to the player. This approach imposes a fixed gas stipend of 2,300, which may lead to failed transactions when interacting with smart contract wallets or wallets with high execution requirements.
The vulnerability exists in the endGame function
The use of transfer in Solidity imposes a hard gas limit of 2,300. If the recipient is a contract with complex logic in its fallback or receive functions, this transfer may fail even if the contract holds sufficient funds. This could prevent valid payouts.
Game payouts may fail for valid winners, leading to an inconsistent user experience and potential loss of trust in the system.
The contract may accumulate stuck Ether if transfers fail repeatedly, making funds inaccessible to intended recipients.
manual review
use this instead
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.