The slopeChanges
mapping in the VotingPowerLib
library is responsible for tracking changes in the slope of voting power over time. However, when users extend or modify their locks, the old slopes are not properly removed or updated, leading to incorrect global voting power decay calculations.
The issue lies in the calculateAndUpdatePower
function within the VotingPowerLib
library.
When a user extends or modifies their lock, the function updates the user's voting power (bias
and slope
) but does not adjust the slopeChanges
mapping to account for the removal of the old slope.
As a result, the global voting power decay calculation remains inconsistent because it continues to include outdated slope values.
Users' voting power may be misrepresented due to inaccurate global decay calculations.
This could lead to unfair voting power distribution, affecting the integrity of governance decisions.
Malicious actors might exploit this flaw to manipulate voting outcomes by strategically modifying their locks.
Manual Review
Ensure that when a user modifies their lock, the old slope is removed from the slopeChanges
mapping before adding the new slope.
Informational. The slopeChanges value is incorrectly maintained but never consumed by any calculations.
Informational. The slopeChanges value is incorrectly maintained but never consumed by any calculations.
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.