# getGetAmplificationParameter() precision is not used, which result in accounting issue in MetaStable2TokenAuraHelper.sol and in Boosted3TokenAuraHelper.sol

Notional's Balancer helpers ignored the precision field from getAmplificationParameter(), so a pool with non-1e3 precision yields wrong spot price and BPT math, corrupting accounting.

- Payout: Contest reward
- Severity: medium
- Program: Notional
- Credited: ctf_sec
- Disclosed: 2022-09-15
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2022-09-notional-judging/issues/124
- Library page: https://bugbountylibrary.com/r/sherlock%3A2022-09-notional%3AM-3
- Tags: domain:web3 impact:integrity kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:precision-loss

**Target:** Balancer MetaStable2Token and Boosted3Token Aura strategy helpers (Solidity)
**Root cause:** getAmplificationParameter() returns (value, isUpdating, precision) but the code discards precision and uses raw value against a hardcoded _AMP_PRECISION = 1e3 in StableMath, so amp is mis-scaled whenever pool precision differs.
**Steps:**
1. Read MetaStable2TokenVaultMixin.sol: `(uint256 value,,) = IMetaStablePool(pool).getAmplificationParameter();` discards precision.
2. Note StableMath._calcSpotPrice uses `uint256 a = (amplificationParameter * 2) / _AMP_PRECISION;` with _AMP_PRECISION = 1e3.
3. Observe Balancer returns value=620000, precision=1000 for amp=620; if precision != 1e3 the raw value is off by the ratio.
4. Trace reinvestReward -> _validateSpotPriceAndPairPrice -> _getSpotPrice -> _calculateInvariant/_calcSpotPrice with the mis-scaled ampParam, producing an invalid spot price.
5. Same in Boosted3TokenPoolUtils._getMinBPT -> _calcBptOutGivenExactTokensIn -> `ampTimesTotal = amplificationParameter * numTokens`, overvaluing amp.
6. Fix: `return value / precision;`
**How found:** Code-reading against Balancer docs: noticed the returned precision/isUpdating tuple members were commented out and unused, then traced how the raw amp value flows into StableMath spot-price and BPT-out formulas that assume 1e3 precision.
**Insight:** When integrating an external pool, check every field of the getter's return tuple against the math library's hardcoded scaling constant; a discarded precision field silently mis-scales all downstream invariant/spot-price math.
