A pool that observed risk but has no eligible stakers can sweep its tracked bonus after a mistaken SURVIVED flag without closing the moderator's re-flag window. If the moderator then corrects the outcome to good-faith CORRUPTED, the corrected bounty snapshot excludes the already-swept bonus, denying the named whitehat the tracked bonus pool.
sweepUnclaimedBonus treats any SURVIVED/EXPIRED pool with totalEligibleStake == 0 as having no outstanding staker reserve, so the whole token balance is sweepable to recoveryAddress even when riskWindowStart != 0 and the balance is protocol-tracked totalBonus. The same function intentionally does not set claimsStarted, leaving flagOutcome's correction window open. On a later correction to good-faith CORRUPTED, flagOutcome snapshots the now-decremented totalBonus and sets the whitehat bounty from snapshotTotalStaked + snapshotTotalBonus.
This is distinct from the documented no-risk-window behavior: here the pool did observe an active-risk window, so the bonus is part of the CORRUPTED bounty if the correct outcome is good-faith CORRUPTED. A mistaken SURVIVED flag creates an interval where anyone can move that tracked bonus to the sponsor-controlled recovery address before the moderator corrects the outcome.
The issue requires a pool with tracked bonus but no eligible stakers, so exploitability is narrow. The impact is concrete value misrouting: funds that should be included in the good-faith whitehat bounty are irreversibly swept to recoveryAddress.
The named good-faith attacker can lose the entire tracked bonus pool. Once swept, the corrected CORRUPTED snapshot records snapshotTotalBonus == 0, so claimAttackerBounty has no entitlement to the bonus even though it was contributed through the supported contributeBonus path before resolution.
A contributor adds 50e18 bonus tokens to a pool with no stakers.
The registry enters UNDER_ATTACK, and pokeRiskWindow() records riskWindowStart > 0.
The registry later becomes CORRUPTED, but the moderator first flags SURVIVED by mistake.
Anyone calls sweepUnclaimedBonus(), which transfers the full tracked bonus to recoveryAddress and leaves claimsStarted == false.
The moderator corrects to good-faith CORRUPTED.
The corrected snapshot has snapshotTotalBonus == 0 and bountyEntitlement == 0.
Validated with:
The PoC passed and showed the corrected good-faith bounty was zero after the SURVIVED-path sweep.
Do not allow sweepUnclaimedBonus to decrement or transfer tracked totalBonus while a moderator correction remains possible for a risk-observed pool. For example, either set claimsStarted on any sweep of tracked bonus, or block sweeping tracked bonus until finality is closed; post-resolution direct donations can still remain immediately recoverable.
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.