graduateAndUpgradeThe graduateAndUpgrade() function includes an authorization check for upgrades but does not correctly invoke the upgrade process as defined by the UUPS pattern.
The function _authorizeUpgrade(_levelTwo); only verifies the caller's permission but does not perform the actual upgrade via upgradeTo(_levelTwo). Furthermore, combining upgrade authorization with fund distribution logic violates best practices of upgradeability, which recommend separating upgrade logic from functional code.
The contract does not actually upgrade to LevelTwo, misleading users and developers. Additionally, if upgrade logic were executed here, combining it with other logic could result in unexpected state if the upgrade fails or is reverted.
Manual code review
Separate the upgrade process into a distinct function:
The system doesn't implement UUPS properly.
The system doesn't implement UUPS properly.
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.