The closeContest
function in the ContestManager
contract does not verify whether the provided contest
address exists in the contests
before attempting to close the contest. This can lead to potential issues if an invalid or non-existent contest address is provided.
The closeContest
function is implemented as follows:
There is no validation to check if the contest address is part of the contests array or if it has any associated rewards. As a result, the _closeContest
function may be called with an invalid address, leading to potential errors or unintended behavior.
Calling _closeContest
with a non-existent contest address may cause errors or fail silently if the address is not valid or does not exist in the contests array.
If the address does not correspond to a valid contest, it could lead to unintended consequences or mismanagement of rewards.
Manual Code Review
Ensure the closeContest
function verifies that the provided contest address either exists in the contests array or has a non-zero value in contestToTotalRewards
.
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.