During the audit of the smart contract code, an unused overridden function _raiseKeeperFee was identified. This function is defined but not utilized anywhere within the contract, raising concerns regarding potential code bloat and clarity of contract functionality.
Vulnerability Detail
The function _raiseKeeperFee is defined in the contract but is not called or utilized anywhere in the contract's logic. Additionally, it is mentioned that this function is overridden, suggesting that it is meant to replace a function defined in a parent contract. However, due to its lack of usage, it serves no purpose in the current implementation of the contract.
The presence of unused code can lead to confusion for developers reviewing the contract and can potentially introduce unnecessary gas costs for deploying and executing the contract on the blockchain. Furthermore, unused code poses a security risk as it may contain vulnerabilities that could be exploited if accidentally invoked in the future.
Informational 02 Unused Function
Low/Info issue submitted by 1337web3
Summary
During the audit of the smart contract code, an unused overridden function
_raiseKeeperFee
was identified. This function is defined but not utilized anywhere within the contract, raising concerns regarding potential code bloat and clarity of contract functionality.Vulnerability Detail
The function
_raiseKeeperFee
is defined in the contract but is not called or utilized anywhere in the contract's logic. Additionally, it is mentioned that this function is overridden, suggesting that it is meant to replace a function defined in a parent contract. However, due to its lack of usage, it serves no purpose in the current implementation of the contract.https://github.com/sherlock-audit/2024-05-kwenta-x-perennial-integration-update/blob/main/perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol#L414-L420
Impact
The presence of unused code can lead to confusion for developers reviewing the contract and can potentially introduce unnecessary gas costs for deploying and executing the contract on the blockchain. Furthermore, unused code poses a security risk as it may contain vulnerabilities that could be exploited if accidentally invoked in the future.
Code Snippet
Tool used
Manual Review
Recommendation
Consider removing the
_raiseKeeperFee
function entirely from the contract if it serves no purpose in the current design.