Description:
Several internal functions in the FeeCollector.sol
, BaseGauge.sol
, and Governance.sol
contracts are never called within their respective contracts, making them dead code. These functions serve important roles, yet their absence in execution raises concerns about incomplete implementations or redundant code that can increase maintenance complexity.
Affected Functions:
In FeeCollector.sol
, the _updateLastClaimTime
function is meant to track the last time a user claimed rewards by updating the lastClaimTime
mapping. However, since this function is never called within the contract, user claim times are not being recorded, which can hinder features like time-based reward calculations or restrictions on frequent claims.
In BaseGauge.sol
, the _updateWeights
function is designed to create a new period or update an existing one for time-weighted average calculations. The function ensures proper weight adjustments for staking and reward distribution, but its absence in execution suggests that weight updates may not be happening, potentially affecting staking incentives and fair reward distribution.
In Governance.sol
, the _isProposalSuccessful
function is responsible for determining whether a proposal has met the quorum and majority vote requirements. Despite its importance in governance decision-making, this function is never called, meaning that proposals might not be correctly validated before execution, potentially undermining the integrity of the governance process.
Impact:
Unimplemented or missing logic: These functions suggest missing or incomplete implementations that could affect key processes like reward tracking, staking calculations, and governance validation.
Unnecessary gas overhead & complexity: Keeping dead code increases contract size, making deployment more expensive and harder to audit.
Proof of Concept:
Each function is marked as internal
, meaning it can only be called within the contract or by inherited contracts. However, manual review confirms they are never used, making them dead code:
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.