MEDIUM-3: The "selectWinner" function sets the "raffleStartTime" before the previous raffle is concluded, creating a potential for tampering with the previous raffle.
The "raffleStartTime = block.timestamp;" statement should be the very last one executed in order to secure a fresh start of all the key variables, and further safely transfer the prizePool and the NFT to the winner. The attacker might register new players and overwrite the winner of the previous raffle.
Potential reentrancy attack, tampering with finished raffle if the "raffleDuration" variable is set very low (in units/seconds). To prevent this misuse
Static analysis, Solodit
Move the "raffleStartTime = block.timestamp;" line to the very end of the "selectWinner" function.
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.