ThePredictor::cancelRegistration() makes external call before doing state changes, making it a reentrancy vector. A smart contract contract registered as user can use this function to steal complete fund from this contract.
The user can also be a contract. Attacker can use a smart contrcat with a fallback function as below to register and calcel registration. It will result the draining of funds.
Loss of complete fund in smart contract
No tools used
Follow CEI (Check -> Effect -> interaction) rule (Make external call only after state change)
Use lock modifier
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.