src/oracle_lib.vy
The oracle_lib._stale_check_latest_round_data() function is expected to ensure prices are fresh and valid before allowing the protocol to proceed. On Ethereum Layer 2 networks like ZKsync Era, there is an additional oracle concern beyond simple staleness: the L2 sequencer can go offline, and when it recovers, initial price data may not reflect the true market price during the downtime period.
Chainlink maintains a dedicated L2 Sequencer Uptime Feed for ZKsync Era. The protocol does not query this feed. When the ZKsync sequencer is offline and returns, there is a "grace period" during which the Chainlink price data is unreliable — the L1 aggregator contracts may not have updated prices while the sequencer was down, meaning the first prices published after recovery are effectively stale even though their updated_at timestamp is recent. An attacker who monitors the sequencer can trade against this window in the first block after sequencer recovery.
Likelihood: Low
ZKsync Era sequencer downtime is uncommon but has occurred during the network's operational history.
The exploitation window requires monitoring the sequencer status, but the attack is deterministic and front-runnable.
Impact: High
Attacker mints DSC at a stale price not reflecting market conditions during sequencer outage.
The resulting DSC is backed by overvalued collateral — instantly undercollateralized once oracle updates.
Protocol accumulates irrecoverable bad debt; DSC peg is threatened.
Severity: Medium
An attacker monitors the ZKsync Era sequencer status. When the sequencer goes down for 2 hours (during which ETH drops 20%), the attacker positions themselves to be first to transact when the sequencer returns. The first Chainlink update after recovery uses the pre-downtime price (the aggregator on L1 didn't update during sequencer outage). The attacker mints DSC at the higher pre-downtime price, creating an instantly undercollateralized position.
Add a sequencer uptime check to oracle_lib.vy following Chainlink's recommended pattern for L2 deployments. The sequencer feed address for ZKsync Era should be set as an immutable at deployment.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.