# A new era might be triggered despite a significant value being held in the previous era

In Reserve StRSR, a small RSR seizure after a prior near-threshold seizure pushes the stake/draft rate over the limit, starting a new era and wiping all stakers' holdings.

- Payout: Contest reward
- Severity: high
- Program: Reserve
- Credited: 0xA5DF
- Disclosed: 2023-11-13
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-06-reserve-findings/issues/2
- Library page: https://bugbountylibrary.com/r/c4%3A2023-06-reserve%3AH-02
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** StRSR staking contract (seizure rate / era transition logic)
**Root cause:** beginEra/beginDraftEra trigger when the post-seizure stake or draft rate exceeds a threshold, assuming little value remains; but a prior seizure can leave the rate just below threshold while users re-stake significant value, so a small subsequent seizure crosses the threshold and wipes the era.
**Steps:**
1. Max stake rate = 1e9; a seizure leaves rate at 91e7 (below threshold).
2. Users continue staking, restoring significant total stake value.
3. A ~10% seizure pushes rate to ~1.01e9, crossing threshold.
4. beginEra() executes, wiping all current-era staking/draft holdings.
**How found:** Code review of StRSR.sol seizure rate adjustment and era-transition threshold logic; reasoned that the 'not much left' assumption breaks when a prior seizure left the rate near the threshold and users re-staked.
**Exploitation:** Not attacker-triggered directly; occurs when a seizure (e.g. during a collateral shortfall) crosses the threshold after users have re-staked, destroying their holdings.
**Insight:** When a threshold gates a destructive state transition, check whether the gated quantity can be refilled between events so the threshold no longer reflects the assumption it encodes.
