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

Redundant Inheritance of Ownable Contract

Summary

A redundancy issue has been identified where the contract inherits the Ownable contract, but none of its functionalities or access controls, specifically the onlyOwner modifier, are utilized within the code. This unnecessary inheritance can lead to code bloat and potential confusion.

Vulnerability Details

The contract in question inherits from the Ownable contract, which typically provides basic authorization control functions, simplifying the implementation of user permissions. However, upon review, it's evident that none of the functions within the contract utilize the onlyOwner access control or any other features provided by the Ownable contract. This makes the inheritance redundant and superfluous.

Impact

Inheriting unnecessary contracts can lead to increased bytecode size, which can, in turn, lead to higher deployment costs.

Tools Used

Manual Review

Recommendations

Remove the inheritance of the Ownable contract from the Staking contract.

Support

FAQs

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