VeRaac creates checkpoints each time a user calls lock
, increase
or extend
. Only the timestamp and bias
is stored. Since the slope is missing from these checkpoints, protocol is unable to retrieve the votingPower for a given timestamp from them.
Each time lock/increase/extend is called, calculateAndUpdatePower is resposible to save the latest timestamp
, bias
, and slope
in _votingState.points[user]
variable.
The bias and slope can be defined as:
Bias: The initial voting power at the time of locking.
Slope: The rate at which voting power decreases per second.
The voting power for a voting-escrow system decreases linearly and can be defined by :
The lock
/ increase
/ extend
functions are also creating a checkpoint, saving only the bias and the corresponding timestamp for the user.
To know the true voting power an user has you need all 3. Protocol is unable to compute the voting power at a given time using the checkpoints.
The checkpoints works as a snapshot, allowing protocol to interogate a user's votingPower at any given time.
For example this is needed when users must vote for a governance proposal. Users must vote with their voting power at a given time (eg. proposal time creation) to ensure fairness and that proposal results can't be manipulated.
Note: there is another issue reported in a separate submission related to the fact protocol doesn't read votingPower from the snapshots.
The voting power at a given timestamp can't be used.
The governance and gauge rewards allocation are susceptible to manipulations.
When a checkpoint is created save the slope
too beside bias
and timestamp
.
Ensure that getPastVotes function calculates correctly the voting power using the formulla :
votingPower = bias − slope × timePassed
.
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.