Once the selection period is over, the organiser calls killsRavana
on the Dussehra
contract. This sends half the funds to the organiser. However there is nothing to stop the organiser (or anyone else for that matter) in calling this function again, and getting the remaining funds sent to the organiser address.
There is no check to prevent the second calling of killsRavana
and for the organiser to get sent ALL the funds and leave nothing for the selectRAM to collect. This is demonstrated in the code below. It does not even need the organiser to call killsRavana
either.
The organiser can claim all the funds of the protocol once the killRavana period starts:
foundry + manual review
To prevent a double call, we need to add in a check to see if Ravana has already been killed. We can't use the modifier in the contract as it is checking the inverse we need to check. Add the below code to line 77 in Dussehra.sol
.
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.