The emergencyWithdraw() function allows users to withdraw their locked RAAC tokens in case of emergencies. However, unlike the withdraw() function, it does not update the checkpoint state to zero power. This inconsistency can lead to inaccurate voting power calculations and governance manipulation.
The withdraw() function correctly calls _checkpointState.writeCheckpoint(msg.sender, 0); to reset the user's voting power.
In contrast, the emergencyWithdraw() function does not update the checkpoint state, leaving stale voting power records.
This omission means that even after withdrawing all tokens, a user's previous voting power may still be counted in governance calculations, leading to incorrect vote weight allocations and potential governance manipulation.
Governance Manipulation: Users could retain voting power after withdrawing, allowing them to influence decisions without holding any tokens.
Inconsistent Voting Power Calculation: The voting system may count non-existent voting power, leading to inaccurate vote distributions.
Manual Review .
Update the Checkpoint State in emergencyWithdraw():
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.