The lock
function in veRAACToken checks individual lock amounts but fails to validate against the maximum total locked amount defined in _lockState.maxTotalLocked
, potentially allowing locks beyond the intended protocol limits.
In veRAACToken.sol:
The vulnerability exists because:
_initializeLockParameters()
sets MAX_TOTAL_LOCKED_AMOUNT to 18 tokens:
ttps://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/veRAACToken.sol#L1-L7
lock()
function only validates:
Individual lock amount (MAX_LOCK_AMOUNT: 10M)
Total supply limit
Lock duration
Missing validation against _lockState.maxTotalLocked
High severity because:
Protocol's economic security depends on total locked amount
Can exceed intended maximum locked tokens (18)
Affects voting power calculations
Disrupts protocol's governance mechanism
Could lead to economic imbalances in the system
Manual Review
Static Analysis
Control Flow Analysis
Add total locked amount validation:
✅ Limits each lock to 10M tokens
❌ Doesn't prevent multiple locks
✅ Prevents exceeding max total supply
❌ Different from total locked amount
✅ Ensures minimum 1 year lock
✅ Maximum 4 year lock period
✅ NonReentrant guard
✅ Pausable functionality
✅ SafeTransfer for tokens
No total locked amount validation:
No tracking of per-user total locks:
The existing mitigations are NOT sufficient because:
Individual transaction limits don't protect against cumulative issues
Total supply check is separate from locked amount tracking
No user-level aggregate limits
Missing core validation against maxTotalLocked
Add comprehensive checks:
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.