The challenger can try to win rap battle with defender without risking loosing cred tokens.
When challenger enters the battle their cred tokens are not transferred to the RapBattle contract. Line 49 of the contract was commented out. Hence the challenger can enter the battle without any risk of loosing the cred tokens.
The impact of this error is as follows. The challenger can take part in the battle without transferring the token to the Battle, hence:
a) if they win - they just win
b) if they loose - the contract reverts (trying to transfer the cred token from the challenger) and the defender waits for next battle with the challenger
Insert the following test into your test file to see the findings.
Treat the user and challenger in the same way making them approve the cred tokens to the battle before starting the challenge - use code of line 49 (first link above)
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.