The relationship between the proxy address and the contest is not validated in distributeByOwner.
The owner of the ProxyFactory contract is able to distribute tokens from deployed proxies of contest that are not expired. The distributeByOwner function does not validate that the proxy belongs to the given contest, organizer, and implementation, even though the salt is calculated using these values. So, the owner can use the contestId, organizer, and implementation of any expired contest to distribute tokens from a proxy of another contest that has already been deployed.
Thinking in a not malicious way, if the function distributeByOwner is used by a script to perform the distribution of expired contest and the input holds incorrect values for the proxy address it could lead to a bad distribution of the tokens.
The following test shows how the owner can distribute tokens from a proxy of a contest that has not expired by using the contestId, organizer, and implementation of an expired contest.
Note: the snippet shows only the relevant code for the test. Full test file can be found here.
Medium. Loss of funds when the function distributeByOwner is misused.
None.
Remove proxy parameter from distributeByOwner function and use the salt to get the proxy address. This way, the proxy address is validated and the owner can only distribute tokens from expired contests.
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.