Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

`battleWon` attribute of a rapper is never increased

Description

A rapper has several statistics, and one of them is battleWon. However, this variable is never used in the protocol. It would be impossible to know if a rapper has already won many battles or not. However, it is possible to know this information through events.

Risk

Likelyhood: High

  • The attribute will always be incorrect, except if a fighter didn't participate in any fight.

Impact: Very Low

  • This variable is not used anywhere.

  • The real information is accessible through emitted events.

Recommended Mitigation

Increment and update battleWon attribute for each fight.
Consider adding battleLose attribute to be more transparent about the real stats of a rapper.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`battlesWon` is never updated

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.