The RapBattle::_battle
has a discrepancy in how the battle outcome is determined and reported. Specifically, the event Battle
is emitted with the challenger (msg.sender
) as the winner when the random value is equal to the defenderRapperSkill
, despite the actual logic determining the defender as the winner.
The vulnerability lies in the inconsistency between the event emission and the actual logic used to determine the battle winner. The Battle event is emitted with msg.sender
as the winner when the random value is equal to defenderRapperSkill
, which contradicts the subsequent if statement that determines the defender as the winner based on the same condition.
This inconsistency can impact the transparency and trustworthiness of the contract. Users rely on the event data to understand the outcome of battles, and the discrepancy could lead to confusion.
Manual review.
Adjust the event to accurately reflect the outcome determined by the if statement.
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.