The ScrvusdVerifierV1
and ScrvusdVerifierV2
contracts do not enforce a block finality check, leaving them susceptible to processing data from recently mined Ethereum blocks that may be reorganized.
The ScrvusdVerifierV1
and ScrvusdVerifierV2
contracts do not include a block finality check in their state proof verification functions, such as ScrvusdVerifierV1::verifyScrvusdByBlockHash and ScrvusdVerifierV2::verifyPeriodByBlockHash:
If a proof is submitted for a very recent block (e.g., one mined just one or two blocks ago), that block could be reorganized out of the chain. For example, if a competing chain overtakes the current one, the block hash or state root used in the proof might no longer be valid. This invalidation could lead the contract to accept or process data that becomes outdated or incorrect after the reorganization.
If the block used in the proof is reorganized, the profit_max_unlock_time
or other extracted values might no longer be valid. For instance, a reorganization could alter the state root, changing the underlying data.
These functions process proofs tied to specific blocks without verifying that those blocks are old enough to be considered stable within the blockchain’s canonical chain.
Ethereum blocks, especially recent ones, can be subject to reorganizations due to network latency, miner competition, or forks. During a reorganization, a block initially accepted into the chain may be replaced, rendering its data invalid. Without a mechanism to ensure that the blocks used in proofs are sufficiently old (e.g., 15–30 blocks behind the current block), the contracts are vulnerable to accepting data from unstable blocks. This could result in the contracts updating their internal state with incorrect or outdated information.
The contracts may process data from blocks that are later reorganized, leading to invalid or outdated updates, such as incorrect price or period values.
Manual Review
To address this vulnerability, implement a block finality check in the affected functions:
Define a Minimum Block Delay:
Implement the Check
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.