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.
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.