Although the current implementation of the UUPSUpgradeable contract is not vulnerable to the attacks described in the previous findings, it is recommended to use the OpenZeppelin OwnableUpgradeable contract to make the UUPSUpgradeable contract more robust.
The current implementation makes use of modifiers to ensure the correct ownership and roles of the contract. However, as this implementation does not make use of the heavily audited OwnableUpgradeable
contract, it increases the audit surface area and could make the contract vulnerable to attacks.
Benefits of using the OwnableUpgradeable
contract:
It provides a more robust implementation of the Ownable
contract, which includes additional functionality such as the ability to renounce ownership, pause the contract, and more.
It has been heavily audited, which means that it has been thoroughly tested and has a proven track record of security.
Standard patterns reduce onboarding time for new devs and auditors.
Integrates cleanly with other OpenZeppelin contracts.
Upgradability-friendly patterns built-in, as it tracks ownership in storage slot compatible with proxies and guards against initialisation collisions.
Avoid reinventing the wheel
.
Impact Classification: Low - Informational as this is a recommendation to use the OpenZeppelin OwnableUpgradeable contract.
Likelihood Classification: Low - Likelihood is low as the onlyPrincipal
modifier is working.
Manual review and research of the OpenZeppelin UUPSUpgradeable contract
Use the OpenZeppelin OwnableUpgradeable contract to make the UUPSUpgradeable contract more robust.
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.