# Immature ballots block finalization

Finalization selectors that count ballots still inside their voting window, letting a fresh ballot stall a mature one

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; latest 2026-03-26. Updated 2026-11-17._

## How it works
A finalization routine picks a winner by comparing tallies across a set of ballots, but the set is built without filtering on eligibility — most importantly, without excluding ballots whose voting deadline has not yet passed. A ballot still in flight has a mutable tally: it can be raised at will by its backers. If that transient tally is compared against a mature ballot's settled tally, the in-flight ballot can outrank it and the mature one never finalizes. The broken assumption is "every ballot in the comparison is a finished, comparable result." A minority holding a fresh ballot can therefore block a majority-backed outcome indefinitely, re-creating the decoy each time finalization is retried [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md).

## Where it shows up
- A "most votes" / "best ballot" selector that loops all ballots and compares totals, with no deadline or status filter [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md).
- Finalization guarded by a `require` that calls such a selector, so the guard inherits the selector's flaw [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md).
- Ballot structs carrying an end-time field that the selector never reads [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md).

## How to review
Identify the exact predicate that decides "this ballot is eligible to compete." The invariant: only ballots past their deadline (and otherwise valid) may enter the comparison, and a ballot's tally must be immutable once it competes. Check that the selector filters on the deadline field, not just on existence or vote count. Ask whether a newly created ballot can ever outrank a mature one; if yes, finalization is griefable.

## How finders spotted it
- Read the finalization `require` and followed it into the vote-comparison helper; noticed the loop ignored the ballot end-time, so in-flight ballots with transient tallies were compared against expired ones [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md).

## Variants seen
- Griefing decoy: a fresh ballot with a raised tally blocks a mature whitelisting proposal, repeatable each retry [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md).

## Impact and severity
Finalization is pushed arbitrarily far into the future by a minority, denying the protocol its whitelisting/governance outcome [E3](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md). Severity rises with how long the block can be sustained and whether the stalled outcome gates access or value.

## Evidence
- E1: https://bugbountylibrary.com/r/c4%3A2022-11-ens%3AH-02.md
- E2: https://bugbountylibrary.com/r/blog%3Astepsecurity-io-blog-forcememo-hundreds-of-github-python-repos-compromised-via-account-takeover-and-force-push.md
- E3: https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-14.md
