Functions that perform external calls should follow the Check-Effects-Interactions (CEI) pattern to prevent reentrancy vulnerabilities and improve code clarity.
The withdrawWinnings
function performs external calls before updating state variables, violating the CEI pattern despite having reentrancy protection.
Likelihood:
Pattern violation exists in current implementation
While nonReentrant
modifier prevents exploitation, pattern should still be followed
Impact:
Code violates security best practices
Reduced defense-in-depth approach
Less clear code structure for auditing
Potential confusion about intended execution order
We only audit the current code in scope. We cannot make speculation with respect to how this codebase will evolve in the future. For now there is a nonReentrant modifier which mitigates any reentrancy. CEI is a good practice, but it's not mandatory. Informational
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.