After 90 days have passed, the user who created the contest, by calling the ContestManager::closeContest
function, closes the contest and if someone has not taken the reward, takes 10% of the remaining value, and the rest is divided equally among the claimants.The issue is that if no one claims the reward, the user will recover 10% of the reward, while 90% of the reward will remain locked. This is because the current implementation does not account for the possibility that the number of claimants could be zero.
The vulnerability is located in the Pot::closePot
function, which is called from the ContestManager::_closeContest
function, which is then called from the ContestManager::closeContest
function.
Here we see that, when closing the contest, there is no check for the possibility of having zero claimants.
90% of the reward will remain locked.
Manual Code Review, Foundry Test
Consider the scenario where the number of claimants is zero. One possible code fix could be the following:
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.