Once Distributor Proxy is deployed the Distributor::distribute()
is called through Factory::_distribute(proxy,data)
.The issue relies on the data parameter as the organizer can give any data which included prize distribution to the wrong Winners or to himself steal all the contest funds.
The Vulnerability that took place in the data
parameter is Organizer can call the Distributor
contract with any malformed data that may intentionally or unintentionally distribute the prize to the wrong person.
Even KYC can done for Organizers, but there is a good solution to prevent this bug which is Reffered in #Recommendation
Organizers can get Benefited from participants and cheat them with no distribution of prizes or wrongly distribute them.
Manual Review
After setting up the contest and before the deployment, the owner should add the Winner's Data mapping to the respective salt.
The code can be refactored by adding a new function to add Winner Data and used in the deployProxyAndDistribute()
and other related functions. Also internal _distribure()
is changed from bytes calldata to bytes memory data.
Here is the Fix:
But When Setting up contests and Adding Winner's data there is the responsibility of the Owner
to check the Winner's Data properly.
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.