Users can accidentally overwrite their existing locks by calling lock() multiple times, leading to permanent loss of their RAAC tokens as the original lock data is overwritten without proper withdrawal handling.
In veRAACToken.sol::lock() and LockManager.sol::createLock(), there is no check preventing users from creating a new lock when they already have one:
User locks 1000 RAAC for 1 year
After 6 months, user accidentally calls lock() again with 500 RAAC
Original lock containing 1000 RAAC is overwritten
User can only withdraw 500 RAAC after lock expiry
The original 1000 RAAC are permanently stuck in the contract
Users permanently lose access to their originally locked RAAC tokens
Protocol accumulates stuck RAAC tokens that can never be withdrawn
Voting power calculations may be incorrect
Manual review
Add existence check before creating new locks:
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.