The ScrvusdVerifierV2.sol
contract calls the update_profit_max_unlock_time
function on the ScrvusdOracleV2.vy
contract without checking whether the call success or reverts.
The Vyper-implemented oracle can revert under specific conditions :
Ex: outdated block number or insufficient role permissions.
But the verifier assumes success and returns the bool result directly. This can lead to failures, leaving the oracle misaligning the price growth rate used by the stableswap-ng pool.
**Location : **
ScrvusdVerifierV2.verifyPeriodByBlockHash
:
ScrvusdVerifierV2.verifyPeriodByStateRoot
:
Reason:
The verifier assumes the external call to update_profit_max_unlock_time
succeeds without verifying the return value or handling potential reverts. The Vyper oracle can revert in two cases:
Role Check Failure:
access_control._check_role(UNLOCK_TIME_VERIFIER, msg.sender)
reverts if the caller lacks the UNLOCK_TIME_VERIFIER
role (unlikely under normal operation but possible with misconfiguration).
Outdated Block Number:
assert self.last_block_number <= _block_number
reverts if the submitted _block_number
is less than the stored last_block_number
. (plausible with stale proofs or delays).
Stale Data: If the oracle reverts, its profit_max_unlock_time
remains at the previous value, misaligning the price growth rate fed to the stableswap-ng pool.
Manual Code Review
Modify both functions to explicitly verify the oracle call’s succes
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.