The enroll()
function performs an external call (usdc.safeTransferFrom
) before updating contract state, violating the Checks-Effects-Interactions (CEI) pattern. While USDC's trusted nature minimizes real risk, this remains a best practice violation.
Current Implementation:
Checks conditions
Makes external call (Interaction)
Updates state (Effects)
Best Practice (CEI Pattern):
Checks conditions
Updates state (Effects)
Makes external calls (Interactions)
Theoretical Risk: Potential state inconsistencies if token were malicious
Practical Risk: Low (USDC is non-reentrant)
Reorder operations to follow CEI pattern.
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.