FoundrySolidityLayer 2
7.25 ETH
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Risk Observation Is Rolled Back When Withdrawal Reverts, Allowing Withdrawals After Risk Has Been Observed

DESCRIPTION

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.

SCENARIO

  1. Alice stakes.

  2. Registry moves to UNDER_ATTACK

  3. Alice calls withdraw().

  4. _observePoolState() sees UNDER_ATTACK and tries to set riskWindowStart

  5. withdraw() then reverts with WithdrawsDisabled.

  6. Because the transaction reverted, riskWindowStart remains 0.

  7. Should the registry later rewound to a pre-risk state before any successful pokeRiskWindow() call, withdrawal will become possible again.

RECOMMENDED MITIGATION/FIX

Their should be an atomic call to pokeRiskWindow() when the registry enters active risk state.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 month ago
inallhonesty Lead Judge 22 days ago
Submission Judgement Published
Invalidated
Reason: Design choice
inallhonesty Lead Judge 22 days ago
Submission Judgement Published
Invalidated
Reason: Design choice

Appeal created

player_1 Submitter
21 days ago
inallhonesty Lead Judge
19 days ago
inallhonesty Lead Judge 18 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!