# Creating new withdrawal requests in conjunction with `settleEpochFromEigenLayer` will render system unusable

Withdrawal requests made after settleEpochFromEigenLayer are stuck in the settled epoch, blocking rebalance and locking funds.

- Payout: Contest reward
- Severity: high
- Program: Rio Network Core Protocol
- Credited: 0xkaden
- Disclosed: 2024-02-14
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2024-02-rio-network-core-protocol-judging/issues/4
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-02-rio-network-core-protocol%3AH-1
- Tags: domain:web3 impact:dos impact:funds-loss kind:contest platform:sherlock sev:high technique:source-review vuln:accounting-error vuln:business-logic

**Target:** RioLRTWithdrawalQueue and RioLRTCoordinator contracts
**Root cause:** settleEpochFromEigenLayer marks the epoch settled but does not increment currentEpochsByAsset; queueCurrentEpochSettlement can only be called once per epoch, so new requests cannot be processed.
**Steps:**
1. User requests withdrawal > depositPool balance; rebalance triggers queueCurrentEpochSettlement and EigenLayer withdrawal.
2. After 7-day delay, call `settleEpochFromEigenLayer(asset, epoch, withdrawals, middlewareTimesIndexes)` to mark epoch settled.
3. New withdrawal requests are still accepted for the same epoch, increasing sharesOwed.
4. Claiming withdrawals for the epoch pays out only the originally received assets; new requests remain unfulfilled.
5. Subsequent `rebalance(asset)` reverts with WITHDRAWALS_ALREADY_QUEUED_FOR_EPOCH, preventing epoch progression and locking funds.
**How found:** Auditor observed that settleEpochFromEigenLayer does not increment the epoch counter and that queueCurrentEpochSettlement has a one-time-per-epoch guard, then constructed a test to confirm the lock.
**Exploitation:** Any user can trigger the lock by submitting a withdrawal request after settleEpochFromEigenLayer; no capital needed beyond the withdrawal amount, and the system becomes unusable.
**Insight:** In epoch-based withdrawal systems, ensure the epoch counter advances when settlement is initiated, not only when fully settled, to prevent late requests from being stranded.
