The emergencyWithdraw
function in the veRAACToken contract allows users to withdraw their deposited tokens but does not reset their voting power checkpoint to zero. As a result, users can continue to exert voting power even after they have no funds deposited in the contract.
A user can retain governance power despite withdrawing all their locked tokens, leading to a governance manipulation risk.
The emergencyWithdraw
function fails to update the checkpoint data to reflect a zero voting power after withdrawal. This occurs because it does not invoke Checkpoints.writeCheckpoint()
to set the user’s voting power to zero.
Modify the emergencyWithdraw
function to ensure the user’s voting power is set to zero by updating their checkpoint:
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.