The SmartVaultManagerV5
contract is designed as an upgradeable contract which inherits from OpenZeppelin upgradeable contracts ERC721Upgradeable
and OwnableUpgradeable
:
Hence as recommended, it makes use of the function initialize()
here:
The issue is that when using upgradeable contracts, it is important to implement an initializer which will call the base contract’s initializers in turn -
It does not call __Ownable_init()
, which results in the following logic from OwnableUpgradeable
to be skipped:
Therefore, the contract owner stays zero initialized/does not update, and this means any function in the contract with use of onlyOwner
is impacted.
It also does not call __ERC721_init()
, which results in the following logic from ERC721Upgradeable
to be skipped:
The initialize()
function also lacks a check for access control and hence runs some risk of it being called by an external front-runner.
The Pool contract is designed to be upgradeable but is actually not upgradeable.
Manual inspection
Make the calls to parent initializers
Other variables may optionally be also intitialized here
Also, best to add a require
statement enforcing access control so that the call to initialize()
can not be front-run by an external user
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.