The createLock
function in the LockManager
library lacks a mechanism to prevent users from overwriting their existing locks. If a user calls the lock
function multiple times, their existing lock will be overwritten, resulting in the loss of previously locked RAAC tokens. This issue arises because the function does not check whether the user already has an active lock before creating a new one. This could lead to unintended loss of funds.
The lock
function creates a new lock for a user without checking if they already have an active lock. If a user calls the lock
function multiple times, the existing lock is overwritten, and the previously locked RAAC tokens are lost.
The function does not check if the user already has an active lock, allowing their existing lock to be overwritten, when a new lock is created, the previously locked RAAC tokens are effectively lost, as they are not returned to the user or accounted for in the new lock.users may unintentionally overwrite their locks, leading to financial losses for users
The function overwrites the existing lock without any checks, leading to potential loss of funds.
Loss of Funds: Users may lose their locked RAAC tokens if they accidentally call the lock
function multiple times.
Manual Review
Ensure the Lock
function checks if the user already has an active lock before creating a new one.
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.