During a manual review of the OracleUpgradeable.sol contract, it was identified that the external function getPrice() is not utilized by other contracts within the protocol. This function merely calls the getPriceInWeth() function, which is publicly accessible and actively employed throughout the protocol. Consequently, the getPrice() function's presence serves no purpose, resulting in unnecessary gas consumption during contract deployment and a potential source of confusion for both users and developers.
This issue constitutes a low-priority concern related to code efficiency and redundancy. The getPrice() function in OracleUpgradeable.sol is redundant and results in wasted gas during deployment without contributing to the protocol's functionality. The function could be removed without any adverse impact on the system.
Here is the relevant code:
The impact of this issue is assessed as low. While it doesn't pose any immediate security risks, the unnecessary function consumes additional gas during contract deployment. Removing the redundant function would enhance the efficiency of the protocol and make the codebase more readable.
Manual Review
It is recommended to remove the redundant getPrice() function from OracleUpgradeable.sol. This action will not only save gas during deployment but also improve the contract's clarity and ease of use for both developers and users.
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.