Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

Lack of `__UUPSUpgradeable_init` Call in `initialize` Functions Risks Future Upgrade Safety

Summary

The omission of the __UUPSUpgradeable_init call in the initialize functions within the LLMOracleCoordinator, LLMOracleRegistry, and Swan contracts could jeopardize the stability and functionality of future contract upgrades. While the function is currently empty, failing to include it risks the compatibility of future upgrades, as essential initialization logic may be added in later versions. This oversight could prevent upgrades from executing properly, limit contract flexibility, or potentially render the contract non-operational in certain upgrade scenarios.

Vulnerability details

  • The initialize functions in the provided contracts (LLMOracleCoordinator , LLMOracleRegistry and Swan) call __Ownable_init but omit __UUPSUpgradeable_init. Although this function is currently empty, skipping it makes the contract unprepared for any future logic that might be included in this initializer. This is a risk since UUPSUpgradeable contracts rely on consistent initializer calls to ensure upgradeability integrity.

  • Affected code sections:

Impact

The omission of the __UUPSUpgradeable_init call in the initialize functions of the LLMOracleCoordinator , LLMOracleRegistry and Swan can lead to unexpected behavior in future contract upgrades. Since __UUPSUpgradeable_init may include essential setup logic in future implementations, failing to call it increases error-proneness, particularly if future upgrades implement specific initialization requirements. This vulnerability could prevent future upgrades from functioning as expected, limiting flexibility and potentially leaving the contract in an unusable state.

Tools Used

Manual Code Review

Recommended Mitigation Steps

Add a call to __UUPSUpgradeable_init in all initialize functions, even if it is currently empty. This practice will make the contract more robust and prepared for future upgrades that might include necessary initialization logic within the UUPS initializer.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.