In situations where there are no supporters or if a contest is canceled, sponsors could lose up to 5% of their funds.
Owner initiates a new Contest.
Sponsors fund the contest.
After the expiration period, no submission has been filled and supporters did not join.
The owner calls the deployProxyAndDistributeByOwner or the organizer calls the deployProxyAndDistribute function by putting the sponsors addresses and their correspnding percentages as winners so that they can recover their funds.
The _distribute function in the Distributor contract takes a 5% commission fee, leading to losses for the sponsor.
The sponsors are now in loss. A sponsor can lose up to 5% of his initial funding if he is the only sponsor of the contest.
Manual review
Add a new _distributeBackToSponsors function that does not take fees in case some funds need to be returned to sponsors :
Then add an onlyOwner distributeBackToSponsors function in ProxyFactory contract that calls this function using the proxy.
A simpler idea would be to add a uint256 commission parameter to the _distribute function. this way the caller can specify the commission value in case of sponsors, but this also means that Organizer have access to this parameter.
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.