The emergencyWithdraw function in the veRAACToken contract is missing checkpoint update when clearing a user's lock and voting power. This omission could lead to inconsistencies in the protocol's state.
The emergencyWithdraw function clears the user's lock and voting power data but fails to update the checkpoints to reflect the removal of the user's voting power.
In contrast, the withdraw function correctly updates the checkpoints:
This inconsistency means that the checkpoint system may still reflect the user's voting power even after an emergency withdrawal.
Inconsistent State:
The checkpoint system may retain outdated voting power data, leading to incorrect calculations in functions that rely on checkpoints.
Manual Code Review
Add Missing Checkpoint Update
Update the emergencyWithdraw function to include the missing checkpoint update:
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.