The verifier contracts use hardcoded storage slots which makes them brittle to upstream contract change.
In ScrvusdVerifierV1.sol, the storage slots are hardcoded:
also in ScrvusdVerifierV2.sol:
If the scrvUSD contract is upgraded and change its storage layout, these verifiers would continue to read from the wrong slots without any indication of failure.
If Curve deploys a new version of the scrvUSD vault with a different storage layout:
The verifiers would continue to read from the old slots
This would lead to incorrect parameters being passed to the oracle
The resulting prices would be incorrect
This lead to incorrect pricing information being used across chains causing losses
Implement version checking, a more robust slot verification mechanism in ScrvusdVerifierV1
Optional:
Consider moving to a design that retrieves storage layout information directly or use a registry of known contract versions and their storage layouts.
Invalid, - srCRVUSD is a minimal proxy, meaning it can never by upgraded, see [here](https://www.cyfrin.io/blog/upgradeable-proxy-smart-contract-pattern#:~:text=Minimal%20proxies%20are%20distinct%20from,provide%20upgrade%20or%20authorization%20functionality.) and [here](https://www.rareskills.io/post/eip-1167-minimal-proxy-standard-with-initialization-clone-pattern) for more info. - Even if srcrvUSD is migrated in the future via a new minimal proxy contract deployment (which is highly unlikely), the verifier contracts can be migrated along with it via revoking the access-control within the `ScrvusdOracleV2.vy` and then granting access to a new oracle. This is also not within the scope of this contest.
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.