The graduateAndUpgrade
function calculates wage payments based on the current bursary
value but fails to update the bursary
state variable after distributing funds. This results in an inconsistent internal state where the tracked bursary
does not reflect the actual remaining balance (60%), violating protocol accounting rules.
graduateAndUpgrade
Function:
Code Flaw: The function transfers 40% of the bursary
(35% to teachers, 5% to the principal) but does not reduce the bursary
by the paid-out amount.
Protocol Violation: The documentation specifies that 60% of the bursary
should remain post-upgrade, but the internal state incorrectly retains 100% of the original value.
Initial bursary = 1000 USDC
.
graduateAndUpgrade
pays out 400 USDC
(40%) but leaves bursary = 1000 USDC
(should be 600 USDC
).
High State Inconsistency:
Incorrect Accounting: Subsequent interactions with the contract (e.g., future upgrades, fee calculations) will use an inflated bursary
value, leading to:
Miscalculations in wage distributions.
Protocol logic relying on inaccurate financial data.
bursary
After PaymentsAdjust the bursary
state variable to reflect the remaining 60%:
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.