Two critical issues in the veRAACToken contract's lock management:
1) The check against maxTotalLocked is missing when locking RAAC tokens allowing unlimited total locks, and 2) totalLocked is never decreased on withdrawals, leading to a permanent DoS condition when the inflated totalLocked reaches the maxTotalLockedset by the veRAACTokenwhich is currently 1B.
The maxTotalLocked check is commented out in the LockManager library. This check is missing for both functions: increaseLockand createLock:
However, in the withdrawal functions in veRAACToken.sol, the contract only deletes the lock data without decreasing the totalLocked:
The totalLocked value is critical as it's used in boost calculations:
The lack of validation of max amount minted allows users to bypass the maxTotalLocked limit (1B tokens) set in veRAACToken.
Once the check for the maxTotalLocked is implemented, the system will permanently DoS when totalLocked reaches the maxTotalLockedas it never decreases when withdrawals are made.
Incorrect boost calculations as _boostState.totalWeight uses an inflated totalLocked value.
Manual Review
Implement the check for maxTotalLockedin LockManager:
Add totalLockeddecrease in both withdraw functions:
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.