The distribute function inside Distributor.sol attempts to transfer token to the Winners and STADIUM_ADDRESS. If Token Implements a blacklist like USDC Token, then the transfer wouldn't be possible and the funds can get stuck forever.
The distribute function transfer the funds to the Winners and STADIUM_ADDRESS but, this STADIUM_ADDRESS could be blacklisted by tokens that maintains a blacklist. An Example of this token is common USDC token contract.
Here is the link to the USDC contract on polygon: [USDC]
(The Blacklist code is located on line 2569)
Because of this The token transfer wouldn't be possible and the token will get stuck forever in the Proxy contract. There is no way to change the STADIUM_ADDRESS in the contracts.
The test is using this Example ERC20 With BlackList contract.
Link to test in Case of Blacklisted address [Fail Transfer]: [Test]
Test Link in Case of Non Blacklisted address [Successful Transfer]: [Test]
The Same is Also Possible if a Winner address is Provided that is listed by the Token. But this doesn't lock the funds or do any kind of harm as The Winners can be passed to the distribute function again with different addresses. It only incur some gas cost for computation.
This would not make the transfer of fund impossible and the funds will get stuck forever as there is no way to change the STADIUM_ADDRESS. One might think that deploying new Distributor.sol contract with different STADIUM_ADDRESS might solve the issue but that is also not possible because the Proxy.sol contract has the address of the _implementation or Distributor.sol stored as a state variable and there is no way to change that as well.
Manual Review
There are two ways to solve the issue:
Expensive Way: Add an update function in the Proxy contract itself or in the ProxyFactory to update the address of the implementation.
An Example code:
Less Expensive: Make STADIUM_ADDRESS private state variable instead of immutable and add an update function in the Distributor.sol or ProxyFactory.sol to update the STADIUM_ADDRESS.
An Example Code
Note
Make proper checks so that the addresses can be updated by the owner only or some other trusted party.
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.