sweepUnclaimedBonus() sends the entire accounted bonus to recoveryAddress without setting claimsStarted. The moderator consequently re-flag SURVIVED as good-faith CORRUPTED, but the whitehat’s bounty is calculated from the depleted totalBonus, excluding the swept bonus.
The protocol permits the moderator to correct an outcome while claimsStarted == false. This allows mistakes involving the outcome, good-faith status, or attacker address to be corrected before anyone relies upon the original distribution.
For a SURVIVED outcome where riskWindowStart == 0, stakers are not entitled to bonus rewards. Therefore, sweepUnclaimedBonus() correctly considers the entire bonus pool unreserved and transfers it to recoveryAddress. The problem is that this sweep moves real, accounted value without closing the outcome correction window.
Outcome correction is blocked only when claimsStarted is true:
Claims correctly set this finality latch after transferring value. However, sweepUnclaimedBonus() explicitly does not.
Avoiding the latch is appropriate for donation-only sweeps. Otherwise, an attacker could directly transfer one wei into the pool, sweep it, and prematurely close the moderator’s correction window.
The issue here is applying that exception to every sweep, including sweeps that remove accounted bonus. When there are no remaining stakers or no locally observed risk window, the function reduces totalBonus by the swept amount.
This is not merely removing an unsolicited donation. With riskWindowStart == 0, it can remove the entire genuine bonus pool while leaving the outcome mutable.
A subsequent good-faith CORRUPTED flag snapshots the depleted accounting in `` function.
Because totalBonus was reduced during the earlier sweep, snapshotTotalBonus silently excludes the bonus transferred to recovery.
The broken state transition control flow is therefore:
The contract treats the sweep as final for token accounting but non-final for outcome correction. Those two decisions are incompatible.
Likelihood:
When a pool's active-risk interval passes without anyone interacting with it, riskWindowStart stays 0 and the agreement then settles to CORRUPTED.
When the moderator first flags SURVIVED on an out-of-scope judgment and later corrects it to good-faith CORRUPTED and sweepUnclaimedBonus() is called in the gap between those two actions. The call is permissionless, and the sponsor (who owns recoveryAddress) is directly incentivized to make it, since the sweep locks the bonus into their own address before the moderator can redirect it to the whitehat.
Impact:
The whitehat loses its entire bonus allocation: the tokens are irreversibly transferred to recoveryAddress before the corrected CORRUPTED outcome snapshots balances, so they are never part of bountyEntitlement. Principal remains claimable, but bounty funds reach the wrong recipient.
Set the finality latch on any sweep that removes accounted value, while preserving the
donation-only exemption the existing comment protects. The totalBonus decrement already identifies
the accounted-value case exactly:
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.