Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 913 Bytes

097.md

File metadata and controls

45 lines (27 loc) · 913 Bytes

Real Ruby Turtle

Medium

latestAnswer() is deprecated

Summary

OracleRelay.sol::currentValue() calls latestAnswer() on the aggregator, however this function is deprecated.

Root Cause

currentValue() uses deprecated latestAnswer()

    function currentValue() external view override returns (uint256) {
        int256 latest = aggregator.latestAnswer();
        require(latest > 0, "chainlink: px < 0");
        return uint256(latest);
    }

https://github.com/sherlock-audit/2024-11-oku/blob/main/oku-custom-order-types/contracts/oracle/External/OracleRelay.sol#L18-L22

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

Creating and filling orders is not possible because calls to this function revert.

PoC

No response

Mitigation

Properly use latestRoundData() instead of latestAnswer()