In veRAACToken.sol, the lock()
function is used to lock RAACTokens for an amount of time to get VeRAACTokens and voting power in the protocol. This is done via veRAACToken contract and LockManager createLock()
. The locks for a user are stored in a mapping from the user address to a struct Lock
, that is created in the createLock()
function. The problem arises in the lack of checks of an currently existing lock, leading to the possibility to create a Lock without having redeemed/waited for the previous lock. This could lead to the lose of the funds stored in the previous lock as the lock()
function nor the createLock()
function checks for an existing lock.
This can be checked with the next test, in veRAACToken.test.js
:
IMPACT: Medium -> users could lose a high amount of money if they overwrite a big lock
LIKELIHOOD: Medium/Low -> users can forget they had a lock/ mistakenly make a lock without redeeming the previous one kind of easily
Manual
Create a check for an existing lock in the lock()
or createLock()
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.