latestAnswer doesn't check if the value is up to date #200
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
Handle
pauliax
Vulnerability details
Impact
EIP1271Wallet.sol is calling latestAnswer to get the last 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 allow you to run some extra validations:
See the chainlink documentation for more information: https://docs.chain.link/docs/faq/#how-can-i-check-if-the-answer-to-a-round-is-being-carried-over-from-a-previous-round
Recommended Mitigation Steps
Consider using latestRoundData with validations against stale data.
The text was updated successfully, but these errors were encountered: