Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/generated/FlareFtsoWords.pointers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pragma solidity ^0.8.25;
// file needs the contract to exist so that it can be compiled.

/// @dev Hash of the known bytecode.
bytes32 constant BYTECODE_HASH = bytes32(0x96e4ec5ff213f69e32f76c5ce42fb5ae8a42af3ad080341ce1d1b74a0061723d);
bytes32 constant BYTECODE_HASH = bytes32(0x84d8e6cee8d70e1f48eac054d2f6bd2bf85f17a5b3c18017176f73d6bcbfba2a);

/// @dev The hash of the meta that describes the contract.
bytes32 constant DESCRIBED_BY_META_HASH = bytes32(0x8717d07737e3cedcdddea6cd3337ae762d7089918bf8d818fb0afc5b63e3985a);
Expand Down
5 changes: 3 additions & 2 deletions src/lib/lts/LibFtsoV2LTS.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ library LibFtsoV2LTS {

(uint256 value, uint64 timestamp) = ftsoRegistry.getFeedByIdInWei{value: fee}(feedId);

// Handle stale prices.
// Handle stale prices. Subtraction avoids checked-arithmetic overflow
// when timeout is near type(uint256).max (which means "never stale").
//slither-disable-next-line timestamp
if (block.timestamp > timestamp + timeout) {
if (block.timestamp > timestamp && block.timestamp - timestamp > timeout) {
revert StalePrice(timestamp, timeout);
}

Expand Down
5 changes: 3 additions & 2 deletions src/lib/price/LibFtsoCurrentPriceUsd.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ library LibFtsoCurrentPriceUsd {
revert InconsistentFtso();
}

// Handle stale prices.
// Handle stale prices. Subtraction avoids checked-arithmetic overflow
// when timeout is near type(uint256).max (which means "never stale").
//slither-disable-next-line timestamp
if (block.timestamp > priceTimestamp + timeout) {
if (block.timestamp > priceTimestamp && block.timestamp - priceTimestamp > timeout) {
revert StalePrice(priceTimestamp, timeout);
}

Expand Down
Loading