The VotingPowerState.slopeChanges
mapping is updated in _updateSlopeChanges()
, but it is never used in any other function. As a result, the stored slope change values have no impact on the system, making this unnecessary state storage that increases gas costs without providing any functionality.
slopeChanges
Is Updated But Never Read
The contract modifies slopeChanges
in _updateSlopeChanges()
** Problems**
The slopeChanges
mapping is updated every time a user’s voting power changes, but it is never referenced elsewhere in the contract.
This means any modifications to slopeChanges
have no effect on the voting power calculations.
Unnecessary Storage Increases Gas Costs
Since slopeChanges
is stored on-chain in a mapping, updating it incurs unnecessary gas fees without any functional impact.
Storing useless data increases contract complexity and state size, which is inefficient.
slopeChanges
writes to storage but is never used, wasting gas.
The contract stores data that serves no purpose, increasing blockchain state size.
Manual Review
Remove slopeChanges
if Not Needed
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.