A good-faith CORRUPTED outcome entitles the moderator-named whitehat to the entire pool (principal plus bonus). The moderator may correct a mistaken outcome through the re-flag window for as long as no value has moved, which the contract tracks with the one-way claimsStarted latch: once value leaves the contract, claimsStarted is set and the outcome is final.
When riskWindowStart == 0, sweepUnclaimedBonus sends the entire contributed bonus to the sponsor-controlled recoveryAddress but deliberately leaves claimsStarted unset. The re-flag window therefore stays open on stale accounting. A moderator SURVIVED-then-CORRUPTED correction recomputes bountyEntitlement from the already-drained totalBonus (flagOutcome at ConfidencePool.sol:358 and :362, reached because :327 does not revert while claimsStarted == false), so the whitehat is entitled to principal only and the bonus is stranded at recoveryAddress.
Likelihood:
Occurs whenever a pool holds a contributed bonus and the registry reaches a terminal state without the active-risk window ever being observed, leaving riskWindowStart == 0 (a supported, reachable state per DESIGN §5 and §7, for example a skip straight to PRODUCTION or an instant CORRUPTED).
Occurs whenever the moderator first flags SURVIVED on that registry and later uses the documented §4 re-flag window to correct to good-faith CORRUPTED, while any account calls the permissionless sweepUnclaimedBonus between the two flags. The sponsor is motivated to make that call, since the swept funds land at their own recoveryAddress.
Impact:
The moderator-named good-faith whitehat is underpaid by the entire contributed bonus; those funds are diverted to the sponsor-controlled recoveryAddress. No staker principal is lost, which bounds this at Medium.
The documented re-flag correction mechanism is silently defeated for the bonus: the outcome flips to good-faith CORRUPTED, but the funds that correction is supposed to redirect to the whitehat have already left the contract.
test/PoC_sweep-reflag-bonus-leak.t.sol (extends BaseConfidencePoolTest). With principal S = 100e18 and bonus B = 40e18, the whitehat receives 100, the 40 bonus is stranded at recoveryAddress, and the control test proves the correct payout is 140.
Sweeping the entire reward pool is an outcome-committing value movement, so finalize the outcome in exactly that branch. This keeps the existing 1-wei-donation protection: when a risk window was observed, the bonus is reserved and only genuine excess or dust is swept, so that path still does not latch.
An alternative fix is to block a re-flag into a bonus-owing outcome once the bonus can no longer be honored, by reverting in flagOutcome when totalBonus < snapshotTotalBonus.
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.