Github username: @akshaysrivastav
Submission hash (on-chain): 0x1c2cbd9df087ef96d76619fe9e6806d7cb163565725f1ad40df61652a4ba37d1
Severity: medium
Description:Description\
The PriceOracle contract intends to implement the Chainlink aggregator interface, but it only implements the latestAnswer function.
There are two major issues in this implementation:
The contract does not implement other crucial function of chainlink like latestRoundData, which breaks the compatibility of PriceOracle with contracts that expect a complete chainlink agregator interface.
Github username: @akshaysrivastav Submission hash (on-chain): 0x1c2cbd9df087ef96d76619fe9e6806d7cb163565725f1ad40df61652a4ba37d1 Severity: medium
Description: Description\ The PriceOracle contract intends to implement the Chainlink aggregator interface, but it only implements the
latestAnswer
function.There are two major issues in this implementation:
latestRoundData
, which breaks the compatibility of PriceOracle with contracts that expect a complete chainlink agregator interface.latestAnswer
function is officially deprecated, see https://docs.chain.link/data-feeds/api-reference#latestanswer.Attack Scenario\ The other contracts which expects a complete chainlink aggregator interface won't be able to interact with PriceOracle contract.
Mitigation Consider implementing the complete interface for chainlink as described at https://docs.chain.link/data-feeds/api-reference#functions-in-aggregatorv3interface
Attachments