The function validates against the wrong timestamp, checking event start instead of event end.
The _setFinallizedVaultBalance() should only execute after the event ends to lock in the prize pool.
The function incorrectly checks block.timestamp <= eventStartDate when it should check eventEndDate.
Likelihood:
Called every time setWinner() is executed
Check always passes after event starts (wrong logic)
Could allow premature finalization
Impact:
Logic error in timestamp validation
Doesn't validate what it intends to
Could finalize vault balance while event ongoing
Wrong error message misleads developers
Let suppose the event start on Day1 and ends on Day30 and Today is Day-15, and the _setFinallizedVaultBalance() method is called
The issue can be fixed by using of eventEndDate instead of eventStartDate in the if condition of method
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.