The graduateAndUpgrade function lacks proper validation of critical inputs and contract state, which may lead to failed transactions, fund loss, or improper fund distribution.
Missing Validation on principal Address
There is no check to ensure that principal is a non-zero address. If it is unset or zero, the final transfer to the principal will fail and revert the whole function.
No Bursary Validation
Doesn't verify if bursary has sufficient funds, which may calculate incorrect payment amounts and could lead to failed transfers or zero-value payments.
Incorrect/ no payments.
Contract getting stuck in invalid state.
Manual code review
Static analysis
Add Validation on principal:
Validate bursary is Greater Than Zero:
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.