A malicious user can drain all funds from ThePredicter.sol by calling ThePredicter.sol::cancelRegistration() and re-entering it before the end of execution.
The organisation of ThePredicter.sol::cancelRegistration() where it makes external call before updating state makes it vulnerable to re-entrancy attacks where a user can drain all funds by recalling this function in an external contract hence transferring all the funds to this contract.
All the funds in the contract will be stolen, leaving to spend.
Manual Review
Reorganise the ThePredicter.sol::cancelRegistration() function such that state changes of the contract are updated before any external calls. Follow the checks, effect, calls order.
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.