Assuming that the System-Wide Locking Limit (maxTotalLocked) issue has been fixed,as I have separately reported, a new issue arises:
When users withdraw their locked tokens, totalLocked is not decremented, leading to incorrect balance tracking.
New users cannot lock tokens after withdrawals if totalLocked has reached maxTotalLocked. Neither can existing users increase lock tokens.
Associated governance calculations will also be affected.
When users withdraw their locked tokens, totalLocked remains unchanged, as evidenced of the missing update in the code logic of `veRAACToken.withdraw()`:
Although the user's lock data has been deleted, the system still considers the withdrawn tokens as locked sytem-wide, leading to DoS on new activities via lock() and increase() in the event totalLocked == maxTotalLocked.
Additionally, each time _updateBoostState() is invoked, the inflated _lockState.totalLocked will be assigned to _boostState.totalWeight:
This will correspondingly affects the return value of calculateBoost() that has _boostState inputted as the first parameter when invoking BoostCalculator.calculateTimeWeightedBoost().
The system-wide totalLocked value remains unchanged if it is not explicitly decremented in withdraw(). This prevents any new locks or increases from occurring if totalLocked has already reached maxTotalLocked other than affecting the calculation of the boost multiplier for a user's rewards.
Manual
Consider implementing the following change:
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.