# Amplifier users might not get all the LP fees they are entitled to

MuteAmplifier only calls claimFees while _mostRecentValueCalcTime < endTime, so LP fees accrued after the staking period ends are never claimed and stay trapped in the pair.

- Payout: Contest reward
- Severity: medium
- Program: Mute.io
- Credited: evan
- Disclosed: 2023-04-27
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-03-mute-findings/issues/21
- Library page: https://bugbountylibrary.com/r/c4%3A2023-03-mute%3AM-06
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** MuteAmplifier staking contract / MuteSwitchPairDynamic LP fee claim
**Root cause:** claimFees() is invoked only inside the update modifier's `_mostRecentValueCalcTime < endTime` branch; once any interaction sets _mostRecentValueCalcTime past endTime, the condition is permanently false and claimFees is never called again.
**Steps:**
1. User X stakes large LP amount; user Y stakes normal amount.
2. Staking period ends (block.timestamp > endTime).
3. Y withdraws immediately, triggering update(): _mostRecentValueCalcTime = block.timestamp > endTime.
4. Subsequent update() calls fail the `_mostRecentValueCalcTime < endTime` check, so claimFees() is never invoked.
5. X withdraws 2 weeks later; fees accrued in that window remain unclaimed in the MuteSwitchPairDynamic.
**How found:** Code reading: noticed claimFees() appears in only one location, gated by the `_mostRecentValueCalcTime < endTime` condition, then reasoned about the state transition when a withdrawal occurs after endTime.
**Exploitation:** No attacker action required; the flaw is a passive accounting bug where fees accrue in the pair but the amplifier never claims them, so stakers receive less than entitled and fees are stranded.
**Insight:** When a reward-accrual function is gated by a time-window condition, check whether any state write can push the timestamp past the window and permanently disable accrual for remaining stakers.
