https://github.com/Cyfrin/2024-07-the-predicter/blob/main/src/ThePredicter.sol#L101-L109
withdrawPredictionFees functions use the call method to transfer funds to msg.sender. This is vulnerable to reentrancy attacks because the state change occurs after the fund transfer.
using call
for transferring funds exposes the function to reentrancy attacks. This can be found in the code:
An attacker could exploit this vulnerability to repeatedly call withdrawPredictionFees
function, draining the contract's funds. Reentrancy attacks can severely impact the integrity and financial stability of the contract.
Manual
Implement a reentrancy guard to prevent reentrant calls.
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.