The Curve Storage Proofs protocol contains a vulnerability where parameters extracted from proofs are not verified to come from the same temporal state. The verification process extracts multiple parameters from different storage slots but fails to validate that these parameters represent a consistent state point in time. This creates an opportunity for manipulated proofs that combine parameters from different temporal states, potentially leading to incorrect price calculations, economic imbalances, and exploitation opportunities across the protocol's cross-chain deployments.
The vulnerability manifests in the parameter extraction process in the verifier contracts:
Independent Parameter Extraction Without Temporal Validation: The _extractParametersFromProof function in ScrvusdVerifierV1.sol extracts parameters from different storage slots but has no mechanism to ensure they represent a consistent state point:
Critical Time-Dependent Parameters: Several extracted parameters have time-based relationships that should be consistent:
Oracle Assumes Temporal Consistency: The oracle contract uses these parameters assuming they represent a consistent state:
Exploitation Scenario:
An attacker with the ability to construct manipulated proofs could:
Create a proof that includes total_debt and total_idle from one state point (T1)
Include total_supply and balance_of_self from a different state point (T2)
Mix time-dependent parameters (full_profit_unlock_date and last_profit_update) from inconsistent states
Submit this proof to the verifier
The oracle would accept and use these temporally inconsistent parameters for price calculations
Root Cause:
The fundamental issue is the lack of validation to ensure that parameters extracted from different storage slots represent a consistent temporal state. The protocol relies on the assumption that proofs are constructed honestly, without enforcing temporal consistency through validation.
Economic Impact:
Temporal inconsistency in parameters can lead to:
Incorrect Price Calculations: The raw price calculation depends on multiple parameters being temporally consistent:
Economic Imbalances: Manipulated prices could create arbitrage opportunities:
If total_assets is from a later state (higher) while total_supply is from an earlier state (lower), the price would be artificially inflated
Conversely, using an earlier total_assets with a later total_supply would deflate the price
Unlocking Calculation Errors: Time-dependent parameters affect profit unlocking:
In a protocol with $10M TVL, even modest manipulations could lead to:
Price deviations of 0.1-1% (representing 100K in value)
Incorrect profit unlocking timing affecting yield calculations
Potential for repeated exploitation as new proofs are generated
Technical Impact:
Breaks fundamental assumptions about state consistency
Undermines the reliability of cross-chain state verification
Creates unpredictable interactions between temporally inconsistent parameters
User Impact:
Users receive incorrect price information
Traders could face unfair or manipulated market conditions
Liquidity providers might suffer from value extraction
This vulnerability is classified as MEDIUM severity because:
It requires sophisticated proof manipulation capabilities
The impact depends on the specific parameters manipulated
It breaks fundamental assumptions about state consistency
It creates opportunities for economic exploitation
Manual code review focusing on parameter extraction logic
Temporal consistency analysis across state parameters
State parameter relationship modeling
Economic impact calculation for inconsistent parameter states
Proof manipulation simulation for mixed-state scenarios
Immediate Mitigations:
Add temporal consistency validation to the parameter extraction process:
Add timestamps to proof verification for freshness validation:
Long-term Fixes:
Redesign the proof format to include explicit timestamps for each parameter:
Implement a full state snapshot approach:
Take all parameters from a single, atomic state snapshot
Include cryptographic verification that all parameters come from the same block
Validate the entire state snapshot as a unit rather than individual parameters
Add a parameter consistency validation layer:
Develop a mathematical model of expected relationships between parameters
Validate that extracted parameters conform to these relationship constraints
Reject proofs where parameters violate these relationships
By implementing these measures, the protocol can ensure that parameters extracted from proofs represent a consistent temporal state, preventing manipulation and ensuring accurate price calculations.
- 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.