The emergencyWithdraw
function in the veRAACToken
contract has an issue related to the missing update of the checkpoint.
Lines:
The function deletes the user's lock state and their voting points, but it does not update the checkpoint for the user's voting power. Since checkpoints are crucial for tracking the historical voting power of users at specific points in time. When a user withdraws their tokens, their voting power should be updated to reflect that they no longer hold any locked tokens.
By not updating the checkpoint, the contract leaves a gap in the historical data. If someone queries the voting power of the user after the emergency withdrawal, they may still see the old voting power, which could lead to confusion and incorrect assumptions about the user's voting rights.
Manual Review
To address this issue, the emergencyWithdraw
function should include a call to update the checkpoint after the user has withdrawn their tokens. This can be done by adding a line to write a checkpoint with a voting power of zero:
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.