RapBattle::goOnStageOrBattle
allows one rapper to be stored in the contract waiting for a battle. The second user calling this function will fight against the rapper on stage. However, only the Credibility token of the first user is transferred to the contract as a prize for the win. Challengers have to approve their token, and transferFrom
is used if they lose. A challenger can just not approve any token to be transferred, and they will never lose.
Likelyhood:
Every time a challenger doesn't approve tokens before fighting.
Impact:
Challenger can only win: The function will revert if they lose and pass if they win.
As for the defender, transfer token of the challenger before the fight and send totalPrize
to the winner.
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.