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

BattlesWon by a user is not tracked (No State Update + Inaccurate Record Keeping)

Summary

The RapBattle contract does not maintain a record of the number of battles each user has won. Although there is an event Battle that indicates the winner of each battle, there is no state variable or mapping in the contract that keeps a tally of the victories for each participant. This results in the inability to retrieve or display the number of battles won by a user directly from the contract.

Impact

Without accurate tracking of battles won, the contract lacks a crucial feature that could be used for leaderboards, rewards, or other game mechanics that depend on the number of victories. Users have no on-chain recognition of their achievements, and the game's competitive aspect is diminished.

Tools Used

Manual review

Recommendations

Integrate a mechanism to update the battlesWon attribute in the NFT metadata for the winning rapper's NFT after each battle.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 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.