15,000 USDC
View results
Submission Details
Severity: low

Use `Ownable2Step` rather than `Ownable`

Summary

Use Ownable2Step rather than Ownable

Vulnerability Details

Ownable2Step and Ownable2StepUpgradeable prevent the contract ownership from mistakenly being transferred to an address that cannot handle it by requiring that the recipient of the owner permissions actively accept via a contract call of its own

39 contract DecentralizedStableCoin is ERC20Burnable, Ownable {

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DecentralizedStableCoin.sol#L39

Impact

Ownership could potentially be transferred to a wrong address

Tools Used

Manual review

Recommendations

Use Ownable2Step as it requires new owner to accept the ownership before it is transferred and reduces room for errors

Support

FAQs

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