Overview
When a user calls extend(uint256 newDuration), the contract defers to:
The snippet never verifies that newDuration is strictly larger than the user’s current lock. If the external LockManager library also omits this check, then:
A user with, say, 300 days left in their lock could pass a 100‑day newDuration.
The code calculates newUnlockTime = block.timestamp + 100 days—shorter than the original end, but if the library logic is flawed, it may still proceed to recalculate the user’s voting power as if the lock had been extended (or partially unaffected).
Depending on how the library handles the new duration, a user might:
Lower the actual lock time while still retaining or even boosting minted veRAAC if the function miscomputes newBias or slope under the assumption that any “extend” is valid.
Or keep the same end time (no net extension) but still get an updated bias or slope if the library or code is incorrectly recalculating voting power.
User has 300 days left: The user previously locked tokens for 1 year, with 300 days remaining.
Call extend(100):
The code calls _lockState.extendLock(msg.sender, 100 days).
If the library does not revert or check that 100 < 300 is invalid, the new unlock time might become block.timestamp + 100 days.
Recalculate Voting Power:
(newBias, newSlope) = _votingState.calculateAndUpdatePower(...) is computed with the new unlock time. If the function incorrectly treats it as an actual extension, the user’s minted tokens might remain the same or even increase.
Shorter Lock with Full Power:
The user effectively gets a shortened or unchanged end date while retaining minted tokens, circumventing the time‑weighted lock concept.
Lock Duration Integrity: The entire premise of a time‑weighted escrow is that “extending” must strictly lengthen the lock. Failing to enforce this lets a user shorten or keep the same end date while the function believes it’s extended, potentially awarding more voting power or not penalizing them for a shorter lock.
Governance / Reward Distortions: The user could hold minted veRAAC with a lesser time commitment than the contract intended, undermining the linear “time = power” model.
Enforce Strictly Larger Duration
In extend(...) or the library call, confirm newDuration > userLock.remainingTime. For example:
Library Validation
If the LockManager library is assumed to handle it, ensure it reverts if newDuration <= the user’s current remaining time. Confirm that the library does indeed do so.
Remove Ambiguity
If partial short‑term modifications are part of the design, clarify the effect on minted tokens so that the user’s veRAAC supply is adjusted accordingly (e.g., forcibly burning tokens if the user “shortens” their lock).
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.