You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.
sherlock-admin opened this issue
Jul 8, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
getGasPrice() doesn't check If Arbitrum sequencer is down in Chainlink feeds
Summary
When utilizing Chainlink in L2 chains like Arbitrum, it's important to ensure that the prices provided are not falsely perceived as fresh, even when the sequencer is down. This vulnerability could potentially be exploited by malicious actors to gain an unfair advantage.
Vulnerability Detail
There is no check:
function getGasPrice() publicviewreturns (uint256) {
// If gas feed is set use it.if (fastGasFeed !=address(0)) {
(, int256_answer, , uint256_timestamp, ) =IChainlinkAggregator(fastGasFeed).latestRoundData();
uint256 timeSinceLastUpdate =block.timestamp- _timestamp;
// Check answer is not stale.if (timeSinceLastUpdate > FAST_GAS_HEARTBEAT) {
// If answer is stale use owner set value.// Multiply by 1e9 to convert gas price to gweireturnuint256(upkeepGasPrice) *1e9;
} else {
// Else use the datafeed value.uint256 answer =uint256(_answer);
return answer;
}
}
// Else use owner set value.returnuint256(upkeepGasPrice) *1e9; // Multiply by 1e9 to convert gas price to gwei
}
Impact
could potentially be exploited by malicious actors to gain an unfair advantage.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
ginlee
medium
getGasPrice() doesn't check If Arbitrum sequencer is down in Chainlink feeds
Summary
When utilizing Chainlink in L2 chains like Arbitrum, it's important to ensure that the prices provided are not falsely perceived as fresh, even when the sequencer is down. This vulnerability could potentially be exploited by malicious actors to gain an unfair advantage.
Vulnerability Detail
There is no check:
Impact
could potentially be exploited by malicious actors to gain an unfair advantage.
Code Snippet
https://github.com/sherlock-audit/2023-06-gfx/blob/main/uniswap-v3-limit-orders/src/LimitOrderRegistry.sol#L1447-L1462
Tool used
Manual Review
Recommendation
code example of Chainlink:
https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code
Duplicate of #65
The text was updated successfully, but these errors were encountered: