flagOutcome() allows the moderator to correct a previously flagged outcome until a claim starts. The design document describes claimsStarted as the value-movement finality latch: once value has left under an outcome, later correction can break accounting.
sweepUnclaimedBonus() is intended to recover bonus or excess tokens that are not owed to stakers. In the no-risk-window case, _bonusShare() returns zero, so accounted bonus can become sweepable to recoveryAddress.
Issue: sweepUnclaimedBonus() can transfer accounted totalBonus to recoveryAddress and decrement totalBonus without setting claimsStarted. This allows value to leave during the moderator reflag window while still allowing a later reflag that snapshots depleted bonus accounting.
When an outcome is first flagged as SURVIVED and later corrected to good-faith CORRUPTED, a prior sweepUnclaimedBonus() can reduce the named attacker's bounty from snapshotTotalStaked + original snapshotTotalBonus to only the remaining post-sweep balance.
Likelihood:
A moderator flags SURVIVED while the registry is terminal CORRUPTED, then later corrects the outcome to good-faith CORRUPTED.
A no-risk-window pool has riskWindowStart == 0, causing _bonusShare() to return zero and making accounted bonus sweepable before the moderator correction occurs.
Any caller can execute sweepUnclaimedBonus() between the first flag and the moderator's corrective reflag.
Impact:
The named good-faith attacker receives a smaller bounty than the pool accounting promised for CORRUPTED resolution.
Accounted bonus is redirected to recoveryAddress before the final corrected outcome is established.
The reflag window no longer preserves value-distribution correctness, despite claimsStarted being treated as the finality latch.
An alternative mitigation is to keep sweepUnclaimedBonus() callable before claimsStarted, but reserve accounted totalBonus while the outcome remains reflaggable and allow only unaccounted donations or dust to be swept.
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.
The contest is complete and the rewards are being distributed.