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.
Impact – Medium Up to the entire bonus pool can be routed to the wrong party for good, with no on-chain way to unwind it, and in a stakerless pool the effect is total since bountyEntitlement computes to zero and claimAttackerBounty reverts outright. This impact is definitely not High: the pool stays solvent throughout with no principal ever at risk, and the money ends up at the sponsor's own recoveryAddress, which in most pools means a sponsor recovering a bonus they funded themselves. The whitehat's claim on that bonus also only exists because the moderator changed their mind after the fact. Likelihood – Low Four separate things have to coincide: nobody touches the pool for the whole active-risk window (or there are no stakers to begin with), the moderator flags SURVIVED and later reverses to CORRUPTED, that reversal is good-faith with a named attacker, and a sweep lands between the two flags. The first cuts against staker self-interest, since skipping the poke costs them their entire bonus share, and the second asks the moderator to overturn a scope judgement, which is a bigger deal than the typo fix DESIGN.md #4 offers the window for. The sweep itself I'd treat as near-certain once the rest holds, given it's permissionless and the sponsor has an obvious reason to make the call, but assembling the first three in one pool lifecycle is where this stays rare.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.