Hawk High

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

`TEACHER_WAGE_L2` Incorrectly Allocates 40% to Teachers Instead of 35%

Summary

The LevelTwo contract defines the TEACHER_WAGE_L2 as 40, which represents 40% of the bursary being allocated to teachers. However, according to the project specification, teachers should collectively receive 35% of the school fees as their wages.

uint256 public constant TEACHER_WAGE_L2 = 40; // @audit low teacher wage should still be 35%

Impact

This misconfiguration causes a higher than intended allocation to teachers, which reduces the remaining bursary that could be used for other purposes (e.g., principal pay, upgrades, or student benefits). It may also introduce inconsistencies across contract levels if LevelOne and LevelTwo differ in wage distribution logic.

Recommendation

Change the constant to align with the project specification:

uint256 public constant TEACHER_WAGE_L2 = 35;

Also consider unifying the wage values across levels using shared constants or inherited configurations to prevent future inconsistencies.

Tools Used

Manual Review

Updates

Lead Judging Commences

yeahchibyke Lead Judge 16 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
yeahchibyke Lead Judge 16 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.