The emergencyWithdraw function in the veRAACToken contract is missing a critical checkpoint update that should record the user's voting power being set to zero. This oversight can lead to governance manipulation by allowing users to maintain historical voting power even after withdrawing their tokens through the emergency withdrawal mechanism.
The vulnerability exists in the emergencyWithdraw function which fails to update the user's voting power checkpoint when tokens are withdrawn. The function is missing the crucial line:
This vulnerability can be exploited to manipulate governance voting in the following way:
User locks tokens and gains voting power
A governance proposal is created
User performs emergency withdrawal
User can still vote on the proposal using their old voting power
User can re-lock tokens and vote on new proposals
Results in one set of tokens being used to vote multiple times
This vulnerabilty allows users to maintain voting power without having tokens at risk, which could lead to governance manipulation during emergency situations when the protocol is most vulnerable
Add the missing checkpoint update to the emergencyWithdraw function:
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.