Dria

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

Missing __UUPSUpgradeable_init() call

Summary

The __UUPSUpgradeable_init() function is part of OpenZeppelin’s UUPS upgradeable pattern, which ensures that the contract is correctly set up to support future upgrades. Without calling __UUPSUpgradeable_init(), the upgrade mechanism remains partially uninitialized, which could prevent or disrupt future upgrades.

Impact

Failure to initialize UUPSUpgradeable can lead to errors or failures when trying to upgrade the contract, potentially making the upgrade mechanism inaccessible. This issue can hinder the contract’s flexibility, rendering it unupgradeable or causing security concerns if not correctly initialized.

Tools Used

manual

Recommendations

Add __UUPSUpgradeable_init() to the initialize function to ensure proper setup of the upgradeable functionality.

function initialize(
SwanMarketParameters calldata _marketParameters,
LLMOracleTaskParameters calldata _oracleParameters,
address _coordinator,
address _token,
address _buyerAgentFactory,
address _swanAssetFactory
) public initializer {
__Ownable_init(msg.sender);
+ __UUPSUpgradeable_init();
...
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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