The _validatePrice
function in the contract improperly determines the sequencer status by relying on a hardcoded condition (answer == 0
). Additionally, it does not properly validate the startedAt
timestamp, which can lead to bypassing the sequencer downtime check, causing stale or incorrect price feeds to be used. This creates a significant security risk, potentially enabling attackers to manipulate prices and cause incorrect liquidations or margin calculations.
startedAt
can be 0 when the round is first initialized, meaning block.timestamp - startedAt
will return a very large value.This can lead to the grace period check always passing, even if the sequencer status has not been properly updated.
Impact
If startedAt == 0
, the contract might assume the sequencer is up, leading to a false sense of security and incorrect market price validation.
manual review
Instead of assuming answer == 0
means the sequencer is up, explicitly check both answer
and startedAt
validity:
startedAt is only 0 when contract is not initialized on Arbitrum, but it is already initialized on Arbitrum. startedAt is sufficient for the protocol, it does not need roundID. Current documentation of Chainlink does not have this sentence: “This timestamp returns `0` if a round is invalid.“
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.