Normal behavior: docs/DESIGN.md §3 justifies allowing deposits during UNDER_ATTACK (unlike PROMOTION_REQUESTED/PRODUCTION/CORRUPTED, which are blocked) on the premise that such a depositor's bonus share is "crushed to ~zero by the k=2 weighting, entry is floored at riskWindowStart ≈ now, so (T − entry)² ≈ 0." This is meant to remove any incentive to game a late deposit once risk is publicly visible.
The issue is that the "≈ zero" claim silently assumes T (resolution) is close behind riskWindowStart (the moment risk is first observed). Nothing in the code enforces that gap, and docs/DESIGN.md §1 explicitly states the opposite in general: UNDER_ATTACK is "the agreement's... normal operating mode," not a brief pre-terminal stretch. A new deposit's entryTime is simply max(block.timestamp, riskWindowStart) it is never floored toward T, only toward the start of the risk window. If UNDER_ATTACK runs for any meaningful duration before resolving, a depositor who enters right as the window opens (whether by being the transaction that itself seals riskWindowStart, or simply by depositing moments after someone else seals it) gets entry ≈ riskWindowStart, which can be just as far from T as a genuinely pre-risk depositor i.e. full, not crushed, k=2 weight. Meanwhile every truly pre-risk depositor already in the pool gets floored up to that same riskWindowStart via _clampUserSums, losing their real head start. The result is a transfer of bonus weight from genuinely early stakers to an opportunistic entrant who committed capital only after risk was already known.
Likelihood:
Occurs on every pool where the UNDER_ATTACK phase is not resolved (to PRODUCTION/CORRUPTED) within a short time of first being observed on-chain plausible under the protocol's own stated model, since §1 describes UNDER_ATTACK as the agreement's normal, ongoing operating mode rather than a brief terminal stretch.
Triggers the moment the risk window is sealed (by anyone: a self-sealing depositor, pokeRiskWindow(), or any other pool interaction) while the pool still has significant time remaining before resolution — the earlier in the pool's life UNDER_ATTACK begins relative to T, the larger the captured weight.
Impact:
Bonus share is redistributed away from genuinely pre-risk stakers (who bore risk for the longest, un-hedged, and are the intended beneficiaries of the k=2 weighting) toward an opportunistic entrant who committed capital only after risk was already publicly observable on-chain undermining the stated purpose of both the k=2 formula and the UNDER_ATTACK-deposits-allowed carve-out.
Contradicts the specific, quantified accepted-behavior claim in docs/DESIGN.md §3 ("crushed to ~zero"), so the deposit-gating design decision is not actually delivering the property it was justified by.
Block UNDER_ATTACK deposits, matching the existing PROMOTION_REQUESTED precedent:
pokeRiskWindow() remains available for anyone to seal the window without also being able to profit from the seal. This is the simplest fix but reverses §3's explicit design choice to welcome voluntary risk capital during UNDER_ATTACK.
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.