A lack of input validation in the update_price
functions in ScrvusdOracleV2.vy
. This issue could allow incorrect or malicious data to be processed, potentially affecting the integrity of the contract's operations.
update_price
FunctionDescription: The update_price
function does not properly validate the _parameters
array before assigning its values to the price_params
struct. This could allow invalid or manipulated values to be stored, affecting price calculations and potentially leading to incorrect share valuations.
Affected Code:
Potential Exploits:
An attacker could provide malformed data in _parameters
, leading to incorrect total supply, debt, or profit unlocking rate.
If the values cause an integer overflow, it could disrupt the expected behavior of the contract.
A malicious or faulty input could cause incorrect calculations, leading to an inaccurate share price.
This could destabilize integrations relying on the Oracle.
Attackers may manipulate block numbers to introduce inconsistencies in price calculations.
Manual Review
Set reasonable lower and upper bounds for the update_price
Implement assertions or require statements to prevent extreme values from being set.
Ensure _block_number
is correctly validated to avoid outdated updates.
- 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.