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

`battlesWon` is never updated and used.

Summary

In the _battle function the battlesWon in RapperStats struct is never updated.

Vulnerability Details

If battlesWon is never used or updated it is better to be removed from the struct as it costs unnecessary gas. Or it should be implemented in the _battle function and in the calculation of the strength of the Rapper.

Impact

Low as battlesWon is not used anywhere.

Tools Used

Manual review

Recommendations

After a battle increment the battlesWon variable for the winner.

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.