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. Namely, this 10% is not transferred to the user (the one who started the contest), but to the ContestManager contract, and thus these funds remain locked at the address of the ContestManager contract.
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.
We can see here that the funds are sent to the msg.sender
address, which in this case is the ContestManager contract, and not the user. This is because the Pot::closePot
function is not called directly by the user, but is called through the ContestManager contract using the ContestManager::closeContest
function.
The user's funds remain locked.
Manual code review, Foundry Test
Instead of the msg.sender
address, pass the address of the user who created the contest to the transfer 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.