The veRAACToken contract contains a vulnerability that allows users to bypass the maximum lock amount restriction defined by MAX_LOCK_AMOUNT. While the lock function enforces this limit, the increase function does not check whether the new total locked amount exceeds MAX_LOCK_AMOUNT. This allows users to lock more tokens than intended by first locking a small amount and then repeatedly calling the increase function.
The lock function enforces a maximum lock amount per position via the MAX_LOCK_AMOUNT constant. However, the increase function does not include this check, allowing users to bypass the restriction. This inconsistency in validation creates a loophole where users can exceed the intended maximum lock amount.
lock Function:
increase Function:
The lock function enforces the MAX_LOCK_AMOUNT limit, but the increase function does not.
A user can lock a small amount (e.g., 1 token) and then repeatedly call increase to bypass the MAX_LOCK_AMOUNT restriction.
The bypass undermines the protocol's design, which is intended to limit the maximum amount of tokens a single user can lock.
Manual Review
Ensure the increase function checks that the new total locked amount does not exceed MAX_LOCK_AMOUNT.
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.