The veRAACToken contract is designed as a vote-escrowed token where users lock RAAC tokens to receive voting power with time-weighted decay and boost capabilities. However, the contract currently permits the creation of multiple active lock positions for a single user via the lock() function. This behavior violates the standard ve-token model, in which each user should have only one active lock — and can lead to inconsistent voting power calculations, arithmetic overflows, and overall governance and reward distribution issues.
Issue: The lock() function does not enforce a check to prevent users from creating a new lock when an existing active lock is present.
Expected Behavior: Users with an active lock (i.e., one that has not expired or been withdrawn) should only be able to modify their position using increase() to add additional tokens or extend() to lengthen the lock duration.
Current Behavior: Users can call lock() multiple times even while a previous lock is still active. This bypasses the intended single-lock invariant required by the ve-token model.
When multiple locks exist, this causes arithmetic overflow in the increase() function, making it unusable.
Users who create multiple locks can't use increase() function, their tokens get stuck in the contract until expiry and they must wait for lock expiry to withdraw.
Manual Code Review
Enforce Single Active Lock per User:
Modify the lock() function to check if the caller already has an active lock. If so, revert the transaction with an appropriate error message:
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.