code-423n4 / 2021-09-wildcredit-findings

0 stars 0 forks source link

Oracle should call latestRoundData instead. #116

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

tensors

Vulnerability details

UniswapV3Oracle.sol is calling latestAnswer to get the last WETH price. This method will return the last value, but you won't be able to check if the data is fresh. On the other hand, calling the method latestRoundData() will instead allow you to run some extra validations, and check if the data is usuable.

talegift commented 3 years ago

We'll fix this by removing dependence on ChainLink completely.