The current transferOwnership function allows the onlyDAO to directly set a new owner without requiring any confirmation or action from the nominated account. Implementing a two-step process for transferring ownership is recommended to ensure that the nominated account is a valid and active entity.
The existing transferOwnership function lacks a two-step process for transferring ownership. It allows the owner or admin to immediately nominate a new owner by setting s.ownerCandidate without any further confirmation or action required from the nominated account.
https://github.com/Cyfrin/2023-09-ditto/blob/main/contracts/facets/OwnerFacet.sol#L111-L114
This single-step process can be error-prone and may lead to unintended ownership transfers. There is no mechanism to verify if the nominated account is a valid and active entity.
The lack of a two-step process could potentially lead to unauthorized ownership transfers if an admin mistakenly or maliciously nominates an incorrect account.
Manual Review
Lack of two-step procedure for critical operations leaves them error-prone. Consider adding two step procedure on the critical functions.
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.