# RewardThrottle: If an epoch does not have any profit, then there may not be rewards for that epoch at the start of the next epoch.

RewardThrottle's fillInEpochGaps marks unprofitable epochs as filled without requesting overflowPool rewards, permanently denying those epochs their rewards.

- Payout: Contest reward
- Severity: high
- Program: Malt Protocol
- Credited: cccz
- Disclosed: 2023-05-01
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-02-malt-findings/issues/20
- Library page: https://bugbountylibrary.com/r/c4%3A2023-02-malt%3AH-02
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:solidity vuln:accounting-error vuln:business-logic vuln:reward-distribution

**Target:** RewardThrottle.sol reward distribution contract
**Root cause:** fillInEpochGaps calls _fillInEpochGaps which advances epoch state without requesting underflow rewards from overflowPool, unlike checkRewardUnderflow which does request and distribute them.
**Steps:**
1. Epoch N ends with no profit, leaving a reward underflow.
2. Epoch N+1 begins; call `fillInEpochGaps()` instead of `checkRewardUnderflow()`.
3. `_fillInEpochGaps(epoch)` marks epoch N as filled without calling `overflowPool.requestCapital(underflow)`.
4. Epoch N's underflow reward is never sent to distributor; rewards for that epoch are lost.
**How found:** Code reading comparing checkRewardUnderflow and fillInEpochGaps: both call _fillInEpochGaps, but only checkRewardUnderflow requests and distributes overflowPool rewards, revealing the ordering-dependent loss.
**Exploitation:** Any caller invoking fillInEpochGaps (or admin populateFromPreviousThrottle) before checkRewardUnderflow causes unprofitable epochs to be finalized without pulling overflowPool capital, permanently skipping reward distribution for those epochs.
**Insight:** When two entrypoints share a state-advancing helper but only one performs the payout side-effect, the shared helper can finalize state and strand funds; audit for asymmetric side-effects around idempotent 'fill gaps' routines.
