The SPARKN documentation says: "Winners are selected from the supporters", but there is no check to stop this inside _distribute()
function here.
It is natural to expect that the organizer or sponsor themselves won't be a having a supporter role, and hence can not be a winner. However, there is no such constraint applied in the code. An organizer can pass his address in the winners[]
array (via data
) and claim rewards, as per current code.
Reward can be distributed to organizer
instead of someone from the pool of supporters
.
Manual inspection
Add a check in distribute() function:
Note that we will have to make some more modifications so that the value of organizer_
and sponsor_
are stored in the contract, for the above to work.
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.