Submitted by cmichel
The GasOracle uses two chainlink oracles (GAS in ETH with some decimals, USD per ETH with some decimals) and multiplies their raw return values to get the gas price in USD.
However, the scaling depends on the underlying decimals of the two oracles and could be anything.
But the code assumes its in 18 decimals.
There is a toWad function that seems to involve scaling but it is never used.
The impact is that, If the scale is wrong, the gas price can be heavily inflated or under-reported.
Recommend checking chainlink.decimals() to know the decimals of the oracle answers and scale the answers to 18 decimals such that no matter the decimals of the underlying oracles, the latestAnswer function always returns the answer in 18 decimals.
raymogg (Tracer) confirmed and disagreed with severity:
cemozerr (Judge) commented:
