Pot contract allows authorized claimants 90 days to claim before the manager takes a cut of the remaining pool and the remainder is distributed equally to those who claimed in time. However, in the scenario where there are 0 claimants, protocol will loose funds and they will remain locked in the Potcontract.
When closing the pot the following function is called:
This function is used to distribute rewards to the claimants who claimed in time (90 days from contest start). However, if there are 0 claimants when the closePot function is called, only 10% of the total funds could be restored.
Proof of Conept:
Place the following test in the test/TestMyCut.t.sol:
This vulnerability will cause the loss of funds. The funds will remain locked in the Pot contract, as there is no option to withdraw them.
Manual code review / Foundry tests
Consider a scenario where there are 0 claimants, and in that scenario, transfer all the funds to the Pot owner.
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.