The current ownership transfer process for all the contracts inheriting from Ownable or OwnableUpgradeable involves the current owner calling the transferOwnership() function:
Ownable.sol#L19-L22
In case the nominated EOA account is invalid, there is a significant possibility that the owner might unintentionally transfer ownership to an uncontrolled account. This can result in the loss of access to all functions associated with the onlyOwner
modifier, presenting a potential risk.
VSCode
To mitigate this risk, it is advisable to adopt a two-step process. In this process, the owner nominates an account, and the nominated account must then execute an acceptOwnership()
function to complete the ownership transfer successfully. This approach ensures that the nominated EOA account is both valid and active. To implement this, you can utilize OpenZeppelin's Ownable2Step contract as a replacement for Ownable
.
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.