Submitted by oakcobalt
Code reference: EETHPriceAdapter.sol#L115
EETHPriceAdapter::latestRoundata() is called by PriceOracle::getAssetPriceFromChainlink. It provides price of eETH in baseCurrency(USD) by using two chainlink oracles - ETH/USD(BASE_AGGREGATOR), WETH/ETH (WEETH_AGGREGATOR).
The problem is the flow of getAssetPriceFromChainlink -> EETHPriceAdapter::latestRoundata() would only have price staleness check for BASE_AGGREGATOR oracle, but no price staleness check for WEETH_AGGREGATOR oracle.
Missing price staleness check for one of the two oracle could result in a invalid eETH/USD price.
Flows: PriceOracle::getAssetPriceFromChainlink -> EETHPriceAdapter::latestRoundata
In EETHPriceAdapter::latestRoundData, only the data feed timestamp(updatedAT_) of BASE_AGGREGATOR is passed as return values. WETH_AGGREGATOR is invoked using a simplified method latestAnswer instead of latestRoundData and no meta data of the price feed is passed.
EETHPriceAdapter.sol#L115
In PriceOracle::getAssetPriceFromChainlink, only BASE_AGGREGATORs price staleness is checked.
PriceOracle.sol#L181
Since two chainlink price feeds are used, both price feeds staleness need to be checked to ensure a valid answer.
Consider adding staleness check for WEETH_AGGREGATOR in EETHPriceAdapter::latestRoundata.
thorseldon (BendDAO) acknowledged
0xTheC0der (judge) commented:
