fundContest
is unintentionally called with the same `index`The `fundContest` function in the `ContestManager` contract is vulnerable due to the absence of validation checks to determine if the pot has already been funded. The function does not verify whether the pot has been funded before, which could lead to unintended double funding if its called twice with the same `index`.
if the function is called multiple times with the same `index` without the proper checks to see if it was funded already, it could result in the pot being funded multiple times, leading to an excess transfer of tokens.
This could deplete the contest owner's funds and disrupt the contest's reward distribution.Tools Used
Manual Review
Foundry Test
Add a check to ensure the pot has not funded beforerequire(!pot.isFunded(), "Pot has already been funded");require(!pot.isFunded(), "Pot has already been funded");
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.