Wrong Storage Slots for balanceOf(self)
in ScrvusdVerifierV1 contract
The ScrvusdVerifierV1
contract has the error in defining the storage slot of balanceOf(self)
.
Above calculation(keccak256(abi.encode(18, SCRVUSD))
) misinterprets the correct order of arguments, which leads to accessing wrong slot for balanceOf(self)
, causing the contract to read it from an unintended and incorrect location. It happened because the parameters (18 and SCRVUSD) were put in reverse order.
The verifier reads balance_of_self
from an unintended storage location, leading to corrupted or invalid data. The incorrect data can propagate through the oracle, affecting price calculations and any functionality relying on the verifier.
Make the following update:
- Per sponsor comments, verified slot is vyper, solidity contract only verifies it. - Vyper computes storage slots different from solidity as seen [here](https://ethereum.stackexchange.com/questions/149311/storage-collision-in-vyper-hashmap)
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.