Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zealous Black Grasshopper - Function used in OracleRelay to get price from the chain link oracles in deprecated #895

Open
sherlock-admin3 opened this issue Dec 9, 2024 · 0 comments

Comments

@sherlock-admin3
Copy link
Contributor

Zealous Black Grasshopper

Medium

Function used in OracleRelay to get price from the chain link oracles in deprecated

Summary

The function latestAnswer() used to get price from chainlink data feeds in deprecated the official documentation can be referred.

    function currentValue() external view override returns (uint256) {
        //@audit this function is deprecated by chainlink
        //https://docs.chain.link/data-feeds/api-reference#latestanswer
        int256 latest = aggregator.latestAnswer();
        require(latest > 0, "chainlink: px < 0");
        return uint256(latest);
    }
    ```

### Root Cause

_No response_

### Internal pre-conditions

_No response_

### External pre-conditions

_No response_

### Attack Path

_No response_

### Impact

For now this doesn't really has an impact as this is not used anywhere but as the file is included in the scope the protocol might plan to use this in future for price feeds which can cause stale price issues 

### PoC

_No response_

### Mitigation

_No response_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant