# DoS might happen to `DineroWithdrawRequestManager#_initiateWithdrawImpl()` due to overflow on `++s_batchNonce`

uint16 s_batchNonce in DineroWithdrawRequestManager overflows after 65535 withdrawals, permanently bricking initiateWithdraw and locking all WETH deposits.

- Payout: Audit contest
- Severity: high
- Program: Notional
- Found by: 0xpiken
- Disclosed: 2025-06-27
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/580
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-06-notional-exponent%3AH-6
- Tags: area:web3 domain:web3 impact:dos impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:dos

**Target:** DineroWithdrawRequestManager withdraw manager contract
**Root cause:** s_batchNonce is a uint16 packed into the requestId alongside two uint120 batch IDs; ++s_batchNonce reverts once it reaches 65535.
**Steps:**
1. Call DineroWithdrawRequestManager#stakeTokens() and #initiateWithdraw() repeatedly via an approved vault across accounts
2. Each call executes _initiateWithdrawImpl and increments s_batchNonce
3. After 65535 increments, ++s_batchNonce overflows and reverts
4. All subsequent initiateWithdraw calls revert, locking WETH
**How found:** Code review of requestId bit-packing revealed s_batchNonce typed uint16 while packed with two uint120 batch IDs; noted PirexETH batchId only increments per 32 ETH redemption, making the small nonce the binding constraint.
**Exploitation:** Attacker with an approved vault repeatedly triggers stakeTokens/initiateWithdraw to exhaust the uint16 nonce counter, permanently DoSing the withdraw path so no WETH can be redeemed.
**Insight:** When a value is bit-packed into a shared word, check the width of each field against its realistic growth rate; a counter incremented per user action (not per rare protocol event) sized to fit packing is a DoS vector.

