Skip to content

Commit 9ed1932

Browse files
authored
Merge pull request #25 from morpho-labs/docs/add-safety-comments
2 parents 081af65 + efbc65e commit 9ed1932

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libraries/ChainlinkDataFeedLib.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import {ErrorsLib} from "./ErrorsLib.sol";
1212
library ChainlinkDataFeedLib {
1313
/// @dev Performs safety checks and returns the latest price of a `feed`.
1414
/// @dev When `feed` is the address zero, returns 1.
15+
/// @dev Notes on safety checks:
16+
/// - Staleness is not checked because it's assumed that the Chainlink feed keeps its promises on this.
17+
/// - The price is not checked to be in the min/max bounds because it's assumed that the Chainlink feed keeps its
18+
/// promises on this.
1519
function getPrice(AggregatorV3Interface feed) internal view returns (uint256) {
1620
if (address(feed) == address(0)) return 1;
1721

0 commit comments

Comments
 (0)