The emergencyWithdraw
function in the veRAACToken.sol
contract does not update the checkpoint state after a user withdraws their tokens during an emergency. The checkpoint system is responsible for maintaining historical voting power data, and failing to update it can lead to inconsistencies in governance and voting power calculations.
The checkpoint system tracks historical voting power at specific points in time. When a user withdraws their tokens during an emergency, the emergencyWithdraw
function does not update the checkpoint state to reflect the withdrawal. This results in the following issues:
Inconsistent Voting Power History: Historical voting power data will be incorrect, as the checkpoint does not reflect the withdrawal.
Potential Exploitation: Users could withdraw their tokens during an emergency and still retain their voting power in historical records, potentially allowing them to manipulate governance or reward systems unfairly.
Data Integrity: The integrity of the voting power data is compromised, as the checkpoint system fails to accurately reflect the state of the system after an emergency withdrawal.
Manual Review
Update the checkpoint state in the emergencyWithdraw
function to ensure that the user's voting power is correctly set to zero after the withdrawal. Add the following line before burning the tokens:
The updated function should look like this:
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.