Normally, once value leaves the pool after resolution, the claimsStarted latch is set so the moderator can no longer re-flag the outcome — this ties resolution finality to value movement, and every claim/sweep path honors it. For a good-faith CORRUPTED outcome, the whitehat attacker is entitled to the whole pool (stake + bonus).
However, sweepUnclaimedBonus() deliberately does not set claimsStarted. When riskWindowStart == 0 it treats the full bonus as unreserved and sends it to recoveryAddress, yet leaves the re-flag window open. So the moderator can flag SURVIVED → anyone sweeps the entire bonus to recovery → moderator corrects to good-faith CORRUPTED, which recomputes bountyEntitlement from the now-drained totalBonus. The whitehat is paid stake only, and the bonus is permanently misdirected to recoveryAddress.
Likelihood:
Occurs whenever the registry reaches CORRUPTED with riskWindowStart == 0 (no active-risk state was ever observed on-chain), which is the ordinary "no observable risk" case.
Occurs whenever the moderator flags an interim SURVIVED and later corrects it to good-faith CORRUPTED, while anyone calls the permissionless sweepUnclaimedBonus() in between (e.g. the sponsor who controls recoveryAddress).
Impact:
The entire bonus pool is permanently misdirected to recoveryAddress instead of the whitehat attacker who is owed the whole pool.
The whitehat is underpaid — receiving stake only — and no path returns the swept bonus, defeating the design's guaranteed pre-claim re-flag correction.
Add the following test to test/unit/BonusSweepReflagMisdirection.t.sol and run
forge test --match-test test_EXPLOIT_sweepBeforeReflag_strandsBonus -vv:
Output:
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.