The IBlockHashRetain.vyi
interface lacks crucial validation for block numbers and timestamps. This creates vulnerabilities around block finality and cross-chain compatibility.
Current implementation lacks essential validations:
Critical issues:
No minimum block confirmation checks
Missing block finality validation
Absence of chain-specific block time adjustments
No protection against future block numbers
Lack of stale data prevention
Potential use of unfinalized block data
Cross-chain synchronization issues
Risk of stale data usage
Manipulation of block timing
Chain reorganization vulnerabilities
Manual Review
Cross-chain compatibility analysis
Implement comprehensive block validation:
Add timestamp validation:
Implement chain-specific adjustments:
These enhancements provide:
Chain-specific block validation
Protection against unfinalized data
Cross-chain compatibility
Timestamp deviation protection
Proper block finality checks
- Anything related to the output by the `BLOCK_HASH_ORACLE` is OOS per \[docs here]\(<https://github.com/CodeHawks-Contests/2025-03-curve?tab=readme-ov-file#blockhash-oracle>). - The PoC utilizes a mock `BLOCK_HASH_ORACLE`which is not representative of the one used by the protocol - Even when block hash returned is incorrect, the assumption is already explicitly made known in the docs, and the contract allows a subsequent update within the same block to update and correct prices - All state roots and proofs must be verified by the OOS `StateProofVerifier` inherited as `Verifier`, so there is no proof that manipulating block timestamp/block number/inputs can affect a price update - There seems to be a lot of confusion on the block hash check. The block hash check is a unique identifier of a block and has nothing to do with the state root. All value verifications is performed by the OOS Verifier contract as mentioned above
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.