The last_block_number
state variable is shared between update_profit_max_unlock_time
and update_price
functions. In case when one of the functions is called with a block number N
, and the other function is called with a block number N-1
, the second function will be blocked by the last_block_number
check.
contracts/scrvusd/oracles/ScrvusdOracleV2.vy
If update_profit_max_unlock_time
and update_price
functions are called in asynchroneous way, the other function can be blocked by the last_block_number
. This may disrupt the oracle update process and lead to outdated price data.
Put the following code in a file tests/scrvusd/oracle/unitary/test_v2.py
Use separate last_block_number
state variable for each update function.
- 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.