Certain ERC-20 like USDC or USDT, have a blacklisted mechanism on its code, and on Pot::closePot
, the protocol uses a for loop to distriute the unclaimed rewards between the players who claimed theirs. If one of the players gets blacklisted in the time they claimed their prize and the time the closePot function is called, the latter will fail making it imposible to close the pot.
The following code snipet points where the function will fail, as a blacklisted account will make the for loop revert.
Pot will not be able to be closed, manager wouldn't get his cut percent and the remaining rewards woudl not be able to be distributed to the claimants, efectively locking the unclaimed money.
Foundry and Manual review
Insted of distributing the amounts rightaway you may calculate the cut of every participant and put it in an array, ass well as, adding a function so that they themselves claim it, that way the pot can be closed regardless of the blacklisted accounts. Aditionally you may create a function where the player can change the address where he wants to recieve the prize.
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.