uint64(fee) cast and unused _isActivePlayer reduce correctness and clarityTwo informational issues degrade code quality. First, selectWinner narrows the fee with totalFees = totalFees + uint64(fee) (src/PuppyRaffle.sol:134), truncating any fee above 2^64 - 1 wei. Second, _isActivePlayer (src/PuppyRaffle.sol:173-180) is an internal function that is never called anywhere in the contract — dead code.
Likelihood:
Low. The truncation only manifests for fees exceeding ~18.4 ETH, and dead code has no runtime trigger at all.
Impact:
Low. The downcast can silently understate totalFees and contribute to broken fee accounting, while the unused _isActivePlayer wastes deployment gas, invites confusion, and may mislead readers/auditors into assuming an active-player check exists where it does not.
A large fee demonstrates the truncation, and a static scan confirms _isActivePlayer has zero callers.
Use uint256 for fees and remove the unused function.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.