LevelTwo bursary is expected to be 60% of total submitted fees, but it shows a value of 100%. This is because the variable is never updated when deducting the staff wages.
in LevelOne.graduateAndUpgrade(), some percentage of the bursary is paid to the principal and teachers. The total amount paid is 40% of the bursary which is followed by an upgrade of the contract. The upgraded contract's bursary variable should reflect the total balance of the contract which is 60% of the fees paid by all students. The staff wages are never deducted from bursary, leading to an incorrect value in the upgraded contract.
Relevant code:
Broken contract invariant: remaining 60% should reflect in the bursary after upgrade. Any future calculations based on the bursary would lead to an incorrect result.
Run forge test --mt test_confirm_can_graduate -vvv.
Expected Result:
Manual Review
Update the bursary after successful payments.
The bursary is not updated after wages have been paid in `graduateAndUpgrade()` function
The bursary is not updated after wages have been paid in `graduateAndUpgrade()` function
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.