20,000 USDC
View results
Submission Details
Severity: medium
Valid

Use `Ownable2Step` rather than `Ownable`

Summary

OpenZeppelin's Ownable2Step and Ownable2StepUpgradeable prevent contract ownership from mistakenly being transferred to an address that cannot handle it (e.g. due to a typo in the address), by requiring that the recipient contract actively accept ownership via a contract call of its own.

Vulnerability Details

There are 3 instances of this issue.

File: src/Beedle.sol
9: contract Beedle is Ownable, ERC20, ERC20Permit, ERC20Votes {
File Link Instance Count Instance Link
Beedle.sol 1 9

File: src/Lender.sol
10: contract Lender is Ownable {
File Link Instance Count Instance Link
Lender.sol 1 10

File: src/Staking.sol
11: contract Staking is Ownable {
File Link Instance Count Instance Link
Staking.sol 1 11

Impact

Contract ownership may be mistakenly transferred to an address that cannot handle it (e.g. due to a typo in the address).

Tools Used

baudit: a custom static code analysis tool; manual review

Recommendations

Use Ownable2Step rather than Ownable. For upgradeable contracts, use Ownable2StepUpgradeable.

Support

FAQs

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