Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Inconsistent wage constants between implementations cause confusion

Description:

The LevelOne and LevelTwo contracts define different wage constants for teachers, but only those in LevelOne are actually used for payments. This creates confusion and makes the code less maintainable.

// In LevelOne.sol
uint256 public constant TEACHER_WAGE = 35; // 35%
uint256 public constant PRINCIPAL_WAGE = 5; // 5%
// In LevelTwo.sol
uint256 public constant TEACHER_WAGE_L2 = 40; // Never used
uint256 public constant PRINCIPAL_WAGE_L2 = 5; // Never used

Impact:

  • Confusion for developers and auditors reviewing the code

  • Misleading constants that suggest a different payment structure than what's actually implemented


Recommended Mitigation:

Since LevelTwo is the final implementation and no further payments will be made using these constants, they should either be removed or aligned with the values in LevelOne

Updates

Lead Judging Commences

yeahchibyke Lead Judge 18 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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