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

Inconsistent Base Skill Definition in RapBattle Contract Documentation and Implementation

Summary

The documentation states a base skill of 50 for rappers in the RapBattle.sol contract, but the actual code sets it to 65. This inconsistency could cause confusion.

Vulnerability Details

The problem lies in the mismatch between the documented and implemented base skill values. Users might expect a skill of 50 but get 65 due to the code.

uint256 public constant BASE_SKILL = 65; // The starting base skill of a rapper //@audit is it 50?
uint256 public constant VICE_DECREMENT = 5; // -5 for each vice the rapper has
uint256 public constant VIRTUE_INCREMENT = 10; // +10 for each virtue the rapper has

Impact

This inconsistency may confuse users and developers, leading to incorrect assumptions about the contract's behavior. It could affect gameplay and strategy decisions in the RapBattle application.

Tools Used

The issue was identified through manual review of the code and documentation.

Recommendations

  1. Documentation Update: Align the README with the actual code by stating the correct base skill value of 65.

  2. Consistency Check: Regularly review and update both the documentation and code to ensure they match.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Battle skill is 65 not 50

Support

FAQs

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