When Ram is selected, someone can call killRavana
function and send half of the total amount collected in the event to the organiser. So it must be called just one time. But killRavana
function may be called multiple times because there is no require statement or modifier that prevent more than one call. And it will send money to the organiser anytime it is called.
If it is called twice, all of money will be send to organiser address. No more reward for the chosen Ram to withdraw.
Manual review
Foundry
Place this test into Dussehra.t.sol, it will pass.
Test pass, we need to prevent this happen.
Check Ravana has not been killed at the top of this function.
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.