The Curve Storage Proofs protocol contains a vulnerability where the proof validation process fails to enforce semantic integrity of proof elements. While the protocol verifies the technical structure of proofs, it lacks validation of semantic relationships between parameters, allowing technically valid but semantically corrupted proofs to pass verification. This vulnerability enables an attacker to construct malicious proofs with impossible or inconsistent parameter combinations, potentially leading to incorrect price calculations, economic exploitation, and undermining of the cross-chain oracle system.
The vulnerability emerges from the lack of semantic validation in the proof verification process:
Minimal Technical Validation Without Semantic Checks: The verification process in ScrvusdVerifierV1.sol
validates only the basic structure of proofs without enforcing semantic consistency:
Critical Economic Parameter Relationships: The protocol relies on several invariants that should be enforced but aren't:
Oracle Accepts Parameters Without Validation: The oracle contract blindly accepts parameters without validating economic invariants:
Exploitation Scenario:
An attacker with the ability to construct manipulated proofs could:
Create a proof with balance_of_self
> total_supply
(an impossible state)
Create a proof with extremely high profit_unlocking_rate
but very low balance_of_self
Create a proof with full_profit_unlock_date
< last_profit_update
(impossible timeline)
Submit these proofs to manipulate price calculations in advantageous ways
Root Cause:
The fundamental issue is the lack of semantic validation of extracted parameters. The protocol verifies that proofs are technically valid against a state root but fails to enforce economic and logical invariants that must hold for the protocol to function correctly.
Economic Impact:
Semantic inconsistencies in parameters can lead to:
Manipulated Price Calculations: The raw price calculation becomes vulnerable to manipulation:
Extreme Value Attacks: Parameters could be pushed to extreme values while maintaining technical validity:
Setting balance_of_self
> total_supply
could cause underflow in supply calculations
Setting impossibly high profit_unlocking_rate
could manipulate price projections
Creating inconsistent time relationships could break unlocking calculations
Protocol-Breaking Parameter Combinations: Certain combinations could break core economic assumptions:
In a protocol with $10M TVL, parameter manipulation could lead to:
Extreme price deviations (potentially >50% in edge cases)
Complete breakdown of economic calculations
Opportunity for repeated exploitation until patched
Technical Impact:
Breaks fundamental economic invariants of the protocol
Creates potential for division by zero or arithmetic errors
Undermines the reliability of cross-chain price information
User Impact:
Users could face extremely manipulated prices
Arbitrage opportunities could drain value from liquidity pools
Economic calculations throughout the ecosystem could break
This vulnerability is classified as MEDIUM-HIGH severity because:
It requires sophisticated proof manipulation capabilities
The impact can be extreme in certain parameter combinations
It fundamentally breaks the economic security model of the protocol
It creates direct economic exploitation opportunities
Manual code review focusing on parameter validation logic
Economic invariant analysis
Proof manipulation simulations with semantically impossible parameters
Edge case testing of economic calculations with inconsistent parameters
Invariant property testing across state transitions
Immediate Mitigations:
Add comprehensive semantic validation to the parameter extraction process:
Add sanity checks to the oracle when applying parameters:
Long-term Fixes:
Implement a comprehensive economic model verification layer:
Define a formal model of valid protocol states and transitions
Validate all proofs against this model before acceptance
Include cryptographic verification of economic invariants
Add parameter bounds and relationship constraints to the protocol specification:
Document all required economic invariants
Implement validation for all invariants in both on-chain and off-chain components
Create automated testing to verify invariants are maintained across updates
Redesign the proof format to include explicit invariant attestations:
Include cryptographic commitments to economic invariants
Require proofs to demonstrate invariant preservation
Reject proofs that violate critical economic relationships
By implementing these mitigations, the protocol can ensure that proofs maintain semantic integrity, preventing manipulation through technically valid but economically impossible parameter combinations.
- 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.