The cancelRegistration
function in ThePredicter
contract is vulnerable to reentrancy attacks due to state changes occurring after an external call.
In the cancelRegistration
function:
The function makes an external call to send ETH before updating the player's status, violating the checks-effects-interactions pattern.
An attacker could call this function repeatedly before their status is updated, withdrawing more entrance fees than they initially deposited.
Manual code review
Implement the checks-effects-interactions pattern:
Reentrancy of ThePredicter::cancelRegistration allows a maliciour user to drain all funds.
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.