TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: low
Invalid

Use ownable2step instead of Ownable library.

Summary

TempleGold uses Openzepplin's ownable library which could potentially lead to the wrong address being the owner of the TempleGold contract.

Vulnerability Details

Workflow of the TempleGold contract ownership process:

  1. TempleGoldAdmin will be deployed by the DAO deployer.

  2. After deployment (and after required init functions are called), the rescuer and executor on this will be two separate DAO multi-sigs.

  3. TempleGold will be deployed by the DAO deployer.

  4. After deployment and init, templeGold.transferOwnership(address(templeGoldAdmin)); will be called to transfer ownership of this to TempleGoldAdmin.

To transfer the Ownership TempleGold uses Openzepplin's Ownable library.

Using the Ownable.sol contract with its onlyOwner modifier is one of the most common patterns in Solidity. The biggest shortcoming with the Openzeppelin ownable implementation is that it allows the transfer of ownership to a non-existent or mistyped address. Ownable2Step is much safer than Ownable since rather than directly transferring to the new owner, the transfer only completes after the new owner has accepted the ownership. The implementation from Openzeppelin can be found here

Impact

Owner could potentially be transferred to the wrong address.

Tools Used

Manual Review

Recommendations

Replace Ownable with Ownable2Step

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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