If the protocol has a blacklistable ERC20 token like USDC whitelisted in the constructor and a user wins a part of a contest prize that will be paid in USDC, the distribution to pay the different amounts to the winners will revert.
There are ERC20 tokens like USDC that have a logic of blacklisting addresses. If you try to transfer some amount of these tokens to a blacklisted address, it will revert. So if a user wins a part of a contest prize that is paid in a token that is blacklisted, when _distribute
is called, it will be reverted due to this feature.
Result:
If a blacklisted user for a contest token is declared part of the winning prize, the funds would remain stuck in the contract forever because the distribution function will revert when trying to transfer tokens to the blacklisted user. There is a simple solution to avoid this revert just by not distributing the prize to this user, but that would be unfair.
Manual review + foundry testing
Possible solution:
Filter participants for the contest by providing their addresses in advance to check if they are blacklisted or not in the specific token for the contest.
Once a contest has finished and a blacklisted user has won part of the prize, the organizer could ignore his part and distribute his percentage of the prize to other winners. This way, the function call would not revert, but it would be really unfair.
Do not use ERC20 tokens that have blacklists
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.