The price from `StableOracleDAI` is returned with the incorrect number of decimals
The price returned from the `getPriceUSD` function of the `StableOracleDAI` is scaled up by `1e10`, which results in 28 decimals instead of the intended 18.\\nIn `StableOracleDAI` the `getPriceUSD` function is defined as follows...\\n```\\n    function getPriceUSD() external view override returns (uint256) {\\n        address[] memory pools = new address[](1);\\n        pools[0] = 0x60594a405d53811d3BC4766596EFD80fd545A270;\\n        uint256 DAIWethPrice = DAIEthOracle.quoteSpecificPoolsWithTimePeriod(\\n            1000000000000000000, // 1 Eth\\n            0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, // WETH (base token)\\n            0x6B175474E89094C44Da98b954EedeAC495271d0F, // DAI (quote token)\\n            pools, // DAI/WETH pool uni v3\\n            600 // period\\n        );\\n\\n        uint256 wethPriceUSD = ethOracle.getPriceUSD();\\n\\n        // chainlink price data is 8 decimals for WETH/USD, so multiply by 10 decimals to get 18 decimal fractional\\n        //(uint80 roundID, int256 price, uint256 startedAt, uint256 timeStamp, uint80 answeredInRound) = priceFeedDAIETH.latestRoundData();\\n        (, int256 price,,,) = priceFeedDAIETH.latestRoundData();\\n\\n        return (wethPriceUSD * 1e18) / ((DAIWethPrice + uint256(price) * 1e10) / 2);\\n    }\\n```\\n\\nThe assumption is made that the `DAIWethPrice` is 8 decimals, and is therefore multiplied by `1e10` in the return statement to scale it up to 18 decimals.\\nThe other price feeds used in the protocol are indeed received with decimals, however, the Chainlink DAI/ETH price feed returns a value with 18 decimals as can be seen on their site.
Remove the `* 1e10` from the return statement.\\n```\\n// Remove the line below\\n   return (wethPriceUSD * 1e18) / ((DAIWethPrice // Add the line below\\n uint256(price) * 1e10) / 2);\\n// Add the line below\\n   return (wethPriceUSD * 1e18) / (DAIWethPrice // Add the line below\\n uint256(price) / 2);\\n```\\n
This means that the price returned from the `getPriceUSD` function is scaled up by `1e10`, which results in 28 decimals instead of the intended 18, drastically overvaluing the DAI/USD price.\\nThis will result in the USSD token price being a tiny fraction of what it is intended to be. Instead of being pegged to $1, it will be pegged to $0.0000000001, completely defeating the purpose of the protocol.\\nFor example, if a user calls `USSD.mintForToken`, supplying DAI, they'll be able to mint `1e10` times more USSD than intended.
```\\n    function getPriceUSD() external view override returns (uint256) {\\n        address[] memory pools = new address[](1);\\n        pools[0] = 0x60594a405d53811d3BC4766596EFD80fd545A270;\\n        uint256 DAIWethPrice = DAIEthOracle.quoteSpecificPoolsWithTimePeriod(\\n            1000000000000000000, // 1 Eth\\n            0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, // WETH (base token)\\n            0x6B175474E89094C44Da98b954EedeAC495271d0F, // DAI (quote token)\\n            pools, // DAI/WETH pool uni v3\\n            600 // period\\n        );\\n\\n        uint256 wethPriceUSD = ethOracle.getPriceUSD();\\n\\n        // chainlink price data is 8 decimals for WETH/USD, so multiply by 10 decimals to get 18 decimal fractional\\n        //(uint80 roundID, int256 price, uint256 startedAt, uint256 timeStamp, uint80 answeredInRound) = priceFeedDAIETH.latestRoundData();\\n        (, int256 price,,,) = priceFeedDAIETH.latestRoundData();\\n\\n        return (wethPriceUSD * 1e18) / ((DAIWethPrice + uint256(price) * 1e10) / 2);\\n    }\\n```\\n