When distributing token to winners, the organizer may promise payment in one token but choose another, less valuable token, to send rewards as.
Organizer may post an offer as: "Completing this task will reward $100,000 in protocol tokens", leaving supporter to interpret the payment as 100,000 USD fiat equivalent but actually paying 100,000 of a less valuable token, such as JPY Coin.
Note that this is not a case of direct refusal to pay, which is possible but out of scope, but the attempt to manipulate supporters to believe they were mistaken while pleading innocence to still remain participants in the Sparkan protocol, receive the work and pay less then promised.
Reward distribution, regardless of which function from ProxyFactory
is called, reaches ProxyFactory::_distribute
The calldata data
is directly provided as input without any checks in the ProxyFactory
in all cases.
From here, it reaches the Proxy->Distributor::distribute->_distribute
function where the input is checked so that the token is a whitelisted one
Thus, the only only requirements for a valid payment are:
token to be whitelisted
distribution contract proxy to have the tokens
An abuse scenario would be:
organizer
and sponsor
launches a contest with the message "Completing this task will reward $100,000 in protocol tokens"
they send 100,000 USDC to the precalculated proxy address and initiate the contest
supporters
start working on the issue
sponsor
, without announcing, also sends 100,000 JPY Coin tokens (worth $0.006847 at the time of this report)
contest is finished and organizer
distributes 100,000 JPY Coin tokens to supporters
supporters
complain but with the ambiguity owner
can't firmly asses that they are correct
organizer
gets the initial 100,000 USDC from the protocol via owner
help
supporters
are left underpaid for their efforts
Organizer can abuse reward distribution oversight to underpay for services
Manual reviews
Modify protocol logic to include in the payment token in the salt and, when distributing the rewards, take the payment token from the calldata in order to compute the salt. This way, proxy address deployment is tied to reward token and organizers are forced to transparently show exactly what reward token will be used, leaving no room for any interpretation or abuse situation.
Example implementation for setContest
:
and implementation for deployProxyAndDistribute
:
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.