The ScrvusdVerifierV1
and ScrvusdVerifierV2 contracts do not enforce that the timestamp of a submitted block header is newer than the last recorded state update. These contracts rely solely on a block number check (last_block_number <= _block_number
) to ensure data progression, omitting a direct timestamp comparison. This omission could allow the acceptance of stale data in rare scenarios, such as blockchain reorganizations or timestamp anomalies, potentially leading to outdated state updates in the scrvUSD oracle.
The contracts process state proofs to update the scrvUSD oracle’s parameters via functions like ScrvusdVerifierV1::verifyScrvusdByBlockHash and function ScrvusdVerifierV2::verifyPeriodByBlockHash. They verify that the submitted block number is not older than the last recorded block number but do not check the block header’s timestamp against last updated timestamp. This leaves a gap where data from a block with a higher number but an earlier timestamp could be accepted, compromising the oracle’s temporal consistency.
An attacker submits a valid proof for an older block with a timestamp predating the current state, bypassing the block number check.
- See [here]([https://github.com/CodeHawks-Contests/2025-03-curve?tab=readme-ov-file#blockhash-oracle)](https://github.com/CodeHawks-Contests/2025-03-curve?tab=readme-ov-file#blockhash-oracle) on how it is used to verify storage variable - All state roots and proofs must be verified by the OOS `StateProofVerifier` inherited as `Verifier` (where the price values and params are extracted), so there is no proof that manipulating timestamp/inputs can affect a price update - It is assumed that the OOS prover will provide accurate data and the OOS verifier will verify the prices/max unlock time to be within an appropriate bound/values - There is a account existance check in L96 of `ScrvusdVerifierV1.sol`, in which the params for price updates are extracted from
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.