# Less active nominees can be left without rewards after an year of inactivity

VoteWeighting's 53-week lookbehind causes nomineeRelativeWeight() to return 0 for inactive nominees, silently zeroing long-term veOLAS voters' governance power and rewards.

- Payout: Audit contest
- Severity: medium
- Program: Olas
- Found by: marchev
- Disclosed: 2024-08-06
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-05-olas-findings/issues/64
- Library page: https://bugbountylibrary.com/r/c4%3A2024-05-olas%3AM-02
- Tags: area:web3 domain:web3 kind:contest platform:code4rena sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:governance

**Target:** VoteWeighting.sol governance contract (nomineeRelativeWeight / checkpointNominee)
**Root cause:** MAX_NUM_WEEKS caps the lookbehind at 53 weeks, so when a nominee has no checkpoint within that window, nomineeRelativeWeight() extrapolates to 0 instead of carrying the last known bias forward.
**Steps:**
1. Deploy VoteWeighting with two nominees; lock 1M OLAS for 4 years for three users.
2. Charlie votes for nominee[0]; Alice and Bob vote for nominee[1] with maxVoteWeight.
3. Advance 52 weeks; Alice and Bob re-vote for nominee[1], Charlie does not.
4. Advance 2 more weeks (past 53 weeks) and call `checkpointNominee(nominees[0], chainId)`.
5. Call `nomineeRelativeWeight(nominees[0], chainId, nextTime + 54 weeks)` — returns 0 despite Charlie's ~3 years of remaining lock.
**How found:** Code-reading of the lookbehind loop in nomineeRelativeWeight() and comparison to Curve's VotingEscrow, which uses a 5-year lookbehind for a 4-year max lock; noticed the protocol reduced MAX_NUM_WEEKS to 53, breaking the invariant that historical bias is retained for the full lock duration.
**Exploitation:** Not an attack per se: a passive nominee (or one whose voters set-and-forget) loses all relative weight after 53 weeks of no checkpoints, so their locked veOLAS no longer influences governance or earns rewards; a malicious actor could spam nominee creation to make keeper-based checkpointing gas-prohibitive.
**Insight:** When a protocol shortens a lookbehind/checkpoint window below the maximum lock or vesting duration, any set-and-forget position older than that window silently reads as zero — check that historical extrapolation windows cover the longest user commitment.

