oracle_lib.vy contains a hardcoded 72-hour staleness threshold and does not integrate the Chainlink L2 Sequencer Uptime Feed on ZKsync Era. If the ZKsync Era sequencer experiences an outage and comes back online, transactions may be processed against stale L1-originated prices before the Chainlink price feed updates. Furthermore, a 72-hour timeout allows price feeds to lag by up to 3 days before transactions revert.
In src/oracle_lib.vy:
In _stale_check_latest_round_data():
The protocol targets deployment on ZKsync Era. Chainlink documentation explicitly states:
"When an L2 sequencer experiences an outage, transactions queued during the outage are processed in the order received when the sequencer restarts. Price feeds might not be updated immediately upon reboot, causing transactions to execute against stale prices."
To protect against this, protocols deployed on Layer 2 rollups must query the Chainlink L2 Sequencer Uptime Feed and verify that:
The sequencer is active (status == 0).
An appropriate grace period (e.g. 3,600 seconds) has elapsed since the sequencer restarted before accepting price updates.
Additionally, standard heartbeat intervals for Chainlink price feeds on ZKsync Era (and Ethereum) are:
ETH/USD: 24-hour heartbeat (or 0.5% deviation threshold).
BTC/USD: 24-hour heartbeat (or 0.5% deviation threshold).
A 72-hour timeout allows the contract to accept prices that are up to 3 days old during prolonged network congestion or oracle infrastructure failure, during which underlying asset values may have fluctuated dramatically.
Sequencer Downtime Exploitation: Upon sequencer reboot, MEV searchers and arbitrageurs can frontrun liquidations or borrow stablecoins using stale collateral prices before feeds synchronize.
Extreme Price Staleness: Liquidations and minting continue to execute against prices that are days out of date, creating bad debt.
Manual Code Review & Chainlink L2 Integration Guidelines
Architectural Threat Modeling
Implement a check against Chainlink's ZKsync Era Sequencer Uptime Feed:
Reduce the TIMEOUT constant to an asset-appropriate heartbeat interval plus a reasonable margin (e.g. 3 hours for volatile feeds or 25 hours for standard 24-hour feeds).
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.