Manual Reviewed
Setup: Deploy a MaliciousBlockHashOracle contract. Configure it to always return a pre-determined stale state root (e.g., a state root from a block several days old when the SCRVUSD price was different). Deploy a MockScrvusdOracle to observe the updated parameters. Deploy ScrvusdVerifierV1 (or V2) using the MaliciousBlockHashOracle and MockScrvusdOracle addresses.
Execution: A user calls verifyScrvusdByStateRoot on the ScrvusdVerifierV1 contract, providing a recent block number and a valid state proof for the current state of the SCRVUSD contract.
Exploit: The ScrvusdVerifierV1 contract queries the MaliciousBlockHashOracle for the state root of the provided block number. The malicious oracle intentionally returns the stale state root.
Outcome: The _extractParametersFromProof function uses this stale state root to extract outdated parameters. The _updatePrice function then calls the MockScrvusdOracle with these stale parameters. The MockScrvusdOracle will be updated with price information based on the historical, incorrect state root, demonstrating successful stale data injection.
Decentralize Oracle: Explore decentralized oracle solutions for block hash and state root retrieval to reduce reliance on a single point of failure.
Oracle Redundancy: If decentralization is not immediately feasible, implement redundancy by using multiple BLOCK_HASH_ORACLE sources and implementing a mechanism to validate and aggregate data from these sources.
Monitoring and Alerting: Implement robust monitoring of the BLOCK_HASH_ORACLE's behavior and set up alerts for any anomalies or deviations from expected behavior.
- 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.