The organizer can distribute the balance of Proxy.sol
to any arbitrary address he wishes.
Since anyone can sponsor a contest, consider the following scenario:
Organizer comes up with a contest idea and submits it
Contest is created and organizer funds it with a starting sum of e.g. 100USDT
As time passes and the contest is not yet solved, more sponsors take part and fund the contest
At the time of the contest's solution the total amount raised could be any "x" USDT - for example the original 100USDT by the organizer and an additional 400USDT from other sponsors
The organizer is the one that calls the function deployProxyAndDistribute
inside ProxyFactory.sol
and he passes whatever inputs he wishes. The proxy delegates the call to the _distribute
function inside Distributor.sol
with the parameters we used.
Let's closely examine the _distribute
function inside Distributor.sol
before we continue:
There are no checks in place if the address he inputs for address[] memory winners
is the address of the winner/s, thus he can input any EOA he himself has access to and rug the winnings.
He gets back his 100USDT + 400USDT profit of the sponsors' tokens.
One of the main points I want to showcase is that if there is a KYC process for the organizers this is less likely, but during the interview with Patrick the owners clarified that they're adopting the protocol for a lot of people that are non-educated in crypto.
Given this, it makes it more likely that a non-crypto native's EOA is compromised and able to execute such an attack.
The impact is loss of funds for the sponsors and leads to reputational damage to the protocol as a whole.
VSCode, Manual Review
Incorporate checks inside the _distribute
function to compare the addresses of the winner/s address/es with the ones that are being input by the organizer.
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.