The contract intends riskWindowStart to be a one-way lock. Once the registry is observed in an active-risk state, withdrawals should stay disabled forever.
The issue is that withdraw() calls _observePoolState() first, which may set riskWindowStart, but then withdraw() reverts if withdrawals are disabled.
Because the whole transaction reverts, the riskWindowStart update is rolled back too.
Alice stakes.
Registry moves to UNDER_ATTACK
Alice calls withdraw().
_observePoolState() sees UNDER_ATTACK and tries to set riskWindowStart
withdraw() then reverts with WithdrawsDisabled.
Because the transaction reverted, riskWindowStart remains 0.
Should the registry later rewound to a pre-risk state before any successful pokeRiskWindow() call, withdrawal will become possible again.
Their should be an atomic call to pokeRiskWindow() when the registry enters active risk state.
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.