The organizer can distribute only one token using the deployProxyAndDistribute() function, that is incorrect because the sponsor can deposit to the Distributor contract multiple whitelisted tokens causing that some tokens may be stuck in the contract.
The organizer can use the deployProxyAndDistribute() to deploy the Distributor contract and then execute the distribution to winners. Additionally, the sponsor can deposit to the Distributor contract the tokens that are whitelisted, so those tokens can be distributed to the winners.
The problem is that the organizer only have an option to distribute one token because the Distributor::distribute() only accept one token at a time and if was not enough, the organizer can't call again the deployProxyAndDistribute() function with another toker because it will be reverted.
I created a test where the organizer calls deployProxyAndDistribute() for the token jpycv2Address and the distribution to winners is correct but the organizer wants to distribute the token jpycv1Address and the deployProxyAndDistribute() will be reverted. Test steps:
Sponsor deposits jpycv1Address and jpycv2Address.
Organizer calls deployProxyAndDistribute() in order to distributes the token jpycv2Address.
Organizer calls deployProxyAndDistribute() in order to distributes the token jpycv1Address but the transaction will be reverted.
The amount of jpycv1Address will be stuck in the Distributor contract.
The owner can call the distributeByOwner() function but the purpose of the function is not to assign winners, the purpose is to rescue funds if token is stuck after the deployment and contest is over for a while.
The organizer can deploy and distribute only one token, that is a problem because sponsors can deposit to the Distributor contract multiple tokens (the whitelisted tokens) causing that those tokens that the organizer did not distribute to get trapped in the contract.
Manual review
Add the feature that helps the organizer to distribute all the whitelisted tokens.
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.