# MixedPriceOracleV4.sol :: getUnderlyingPrice()/getPirce() will not work for some tokens because API3 and EO oracles return prices using different decimals, causing DOS scenario.

MixedPriceOracleV4 compares API3 (18-decimal) and EO (8-decimal) prices without normalizing, so delta always huge and stale EO feed causes DoS.

- Payout: Audit contest
- Severity: medium
- Program: Malda
- Found by: 0xEkko
- Disclosed: 2025-07-22
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-07-malda-judging/issues/945
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-07-malda%3AM-14
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:dos vuln:oracle-manipulation

**Target:** MixedPriceOracleV4 price oracle contract
**Root cause:** _absDiff compares raw prices from API3 (18 decimals) and EO (8 decimals) without normalizing decimals, producing a huge deltaBps that always exceeds the threshold and forces the EO branch.
**Steps:**
1. Call getUnderlyingPrice() for an mToken whose underlying is wBTC on Linea.
2. API3 returns 120000000000000000000000 (18 dec), EO returns 120000000000 (8 dec).
3. _absDiff computes ~1.2e23, deltaBps >> deltaSymbol, first if branch taken.
4. EO feed is stale, so require(block.timestamp - eOracleUpdatedAt < _staleness) reverts with MixedPriceOracle_eOracleStalePrice().
5. Fresh API3 price is never used, causing DoS.
**How found:** Code review of _getLatestPrice noticed both oracles' latestRoundData outputs are diffed directly; cross-referenced API3 (18 dec) and EO (8 dec) docs to confirm decimal mismatch.
**Insight:** When a contract cross-checks two oracle sources, verify both feeds share decimals before any arithmetic comparison; a decimal mismatch silently biases branch selection and can turn a freshness check into a DoS.

