In case the contract uses multiple tokens as reward, organizers will not be able to distribute it themselves.
As Sparkn aims to build a marketplace for anyone who wants to solve their problems or anyone who wants to help solve problems. There will be instances where the organizer will be looking to provide rewards through different tokens with some ratios.
For Example, a protocol X
can host a contest to solve their problems and given budget constraints they might like to reward helpers with 50% of Stable Coin like USDC + 50% of their own governance token. In such a scenario:
Organizer will transfer the funds to proxy contract.
Organizer will call deployProxyAndDistribute
to deploy the contract and distribute funds.
Given, distribute
function in Distributor
contract only takes 1 token address, Organizer will only be allowed to distribute single token. For rest of the token, organizer
will be dependent on owner
to distribute it on their behalf through: distributeByOwner
.
Organizer will fail to distribute all the rewards
VS Code
Many possible solutions for this like sending an Array of winners data structure which includes token
and amount
. But easiest one is to add a function to allow organizer of a particular contest with the required validation to call _distribute
so that they can rescue their own funds till the time they are within the contest period time.
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.