The admin can fund the contest a second time, which will increase the contract's token balance, but it won't increase the rewards available to users.
The ContestManager::fundContest
function allows admin to fund the contest rewards. When the admin calls the function more than once, the contract's token balance will increase, but will not increase the amount of remaining rewards to be distributed to users, which is stored in the Pot::remainingRewards
variable. The pool of rewards for users, including any unclaimed amounts, will remain at the initial amount specified when the contest was created.
Excess funds added to the contract will be locked at the contest's contract address and cannot be withdrawn.
When the admin calls the ContestManager::fundContest
function a second time, the contract's token balance increases, but the amount of rewards available to users remains unchanged.
Add the following code to the TestMyCut.t.sol
file within the TestMyCut
contract.
Manual Review
Foundry
One possible solution is to provide a mechanism for blocking the funding of a Pot which was already funded. A bool flag could be set after a contest is funded and prevent it from being funded again.
Changes to provide in Pot.sol
file inside the Pot
contract:
Changes to provide in ContestManager.sol
file inside the ContestManager
contract:
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.