# `Carousel.mintRollovers` potentially mints `0` shares and can grief rollover queue

Carousel.mintRollovers mints 0 shares when assets equal relayer fee, leaving finalTVL at 0 and making previewWithdraw revert, permanently griefing the rollover queue.

- Payout: Contest reward
- Severity: medium
- Program: Y2K
- Credited: berndartmueller
- Disclosed: 2023-03-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-03-Y2K-judging/issues/418
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-03-Y2K%3AM-10
- Tags: domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:dos

**Target:** Carousel vault mintRollovers / VaultV2.previewWithdraw
**Root cause:** assetsToMint = queue[index].assets - relayerFee can be 0 when assets == relayerFee, and _mintShares with 0 leaves finalTVL[_id] at 0; previewWithdraw then divides by finalTVL[_id] and reverts.
**Steps:**
1. Queue a rollover with assets exactly equal to relayerFee for an epoch where it is the only deposit.
2. Call `mintRollovers(_epochId, _operations)`; entitledShares > assets passes, assets < relayerFee is false, so `_mintShares(receiver, _epochId, 0)` executes.
3. finalTVL[_epochId] stays 0.
4. Any subsequent `previewWithdraw` on that epoch reverts via `_assets.mulDivDown(claimTVL[_id], finalTVL[_id])` division by zero, blocking the queue.
**How found:** Code reading of mintRollovers arithmetic: noticed assetsToMint subtraction could yield 0 and traced previewWithdraw's division by finalTVL to a revert when TVL is zero.
**Exploitation:** Attacker queues a minimal rollover sized to the relayer fee as the sole deposit for an epoch; once minted with 0 shares, finalTVL remains 0 and every previewWithdraw for that epoch reverts, stalling the rollover queue until the item owner delists.
**Insight:** When a mint/burn path subtracts a fee before computing shares, check the zero-output boundary (assets == fee) and whether downstream share-price math divides by the resulting zero total supply/TVL.
