In the contract RapBattle
, the _battle()
function contains the logic for deciding who wins a rap battle. When this happens, an event log is emitted containing the winner and the battle prize is distributed. Even though they should always be consistent, there is a case that would make the event indicate that the winner is not the same as the address that receives the prize.
Notice in the code snippet below that in the case when random
is equal to defenderRapperSkill
, the event would indicate that the winner is msg.sender
(aka challenger) while the one receiving the prize would be _defender
(the defender).
The RapBattle::Battle
is an important event. The incorrect event logs may cause off-chain services to malfunction.
Manual analysis.
It is recommended to fix the inconsistency between the logs and actual logic as shown below:
or
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.