The current structure of the ProxyFactory contract exposes a significant vulnerability due to its reliance on an address of the implementation contract for each function. Also there is a single owner for the ProxyFactory Contract and it greatly increases the risk for a single point of centralization. If the owner decides to collude with organizer, they can deprive winners of their prize money.
The key vulnerability here is taking the address of implementation for each function and not using a global variable and an upgrade function to change it. Now consider the following scenario:
Alice, the owner, and Bob, an organizer, establish a collusion.
Bob deploys a malicious contract.
Alice creates a contest for Bob, employing the malicious implementation's address instead of the Distributor contract.
After the contest concludes, Bob invokes the end contest function.
Since Alice chose the malicious implementation, the contest concludes abnormally, causing winners not to receive their prizes.
Bob, with Alice's assistance, effectively deprives winners of their rightfully earned prizes.
Below is the contract and a Hardhat POC depicting the above scenario.
Contract
POC
The risk for a single point centralization becomes high and the probability for the malicious contest becomes likely. With this the winners for that contest will be deprived of their prize money.
Manual Review, Hardhat, VSCode
Recommendations:
Using this recommendation the address for implementation address should remain consistent across contest.
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.