# MuteAmplifier.sol: multiplier calculation is incorrect which leads to loss of rewards for almost all stakers

MuteAmplifier's multiplier formula is non-linear versus documented linear spec, so nearly all stakers with tokenRatio between 0 and 1 receive fewer rewards than intended.

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

**Target:** MuteAmplifier.sol staking reward multiplier (Solidity contract)
**Root cause:** calculateMultiplier computes stakeDivisor - tokenRatio*(stakeDivisor-1e18)/1e18, producing a hyperbolic reward curve, whereas the documented spec scales APY linearly with the dMUTE/pool ratio.
**Steps:**
1. Read docs: APY = APY_base + tokenRatio*(APY_max-APY_base), linear in tokenRatio.
2. Read calculateMultiplier: stakeDifference = (_stakeDivisor-1e18)*clamp(tokenRatio)/1e18; return _stakeDivisor - stakeDifference.
3. Read _applyReward: reward = lpTokenOut*weightDiff / calculateMultiplier(...).
4. Model with stakeDivisor=2, lpTokenOut*weightDiff=1: reward = 1/(2-tokenRatio), a convex curve below the linear spec for all tokenRatio in (0,1).
5. Conclude only tokenRatio==0 or ==1 match spec; all others underpaid.
**How found:** Compared the on-site documentation formula (linear APY vs tokenRatio) against the Solidity implementation, then plotted both reward functions to show the code curve lies below the documented line for intermediate ratios.
**Insight:** When a protocol publishes a reward/APY formula, translate it into the exact on-chain arithmetic and plot both curves; reciprocal/divisor-based implementations often diverge from a linear spec and silently underpay the majority of users.
