In ScrvusdOracleV2
The constructor (__init__
) fails to assign the PRICE_PARAMETERS_VERIFIER
role to ScrvusdVerifierV1
and the UNLOCK_TIME_VERIFIER
role to ScrvusdVerifierV2
, which are essential for invoking update_price
and update_profit_max_unlock_time
, respectively. rendering the oracle’s update mechanism inoperable halting its purpose of providing real-time scrvUSD price feeds for stableswap-ng pools until roles are manually assigned post-deployment
The __init__
function initializes the access_control
module and sets role administrators (PRICE_PARAMETERS_VERIFIER
and UNLOCK_TIME_VERIFIER
under DEFAULT_ADMIN_ROLE
) but omits calls to grantRole
for the respective verifiers (ScrvusdVerifierV1
and ScrvusdVerifierV2
). The snekmate.auth.access_control
module, assumed to follow an OpenZeppelin-like role-based access control (RBAC) model, defaults to denying permissions unless explicitly granted. Consequently, the verifiers lack the necessary roles to interact with the oracle’s update functions, which enforce strict role checks via access_control._check_role
.
The vulnerability manifests immediately upon deployment when ScrvusdVerifierV1
attempts to call update_price
or ScrvusdVerifierV2
attempts to call update_profit_max_unlock_time
. The access_control._check_role
function reverts with an "access denied" error (e.g., "missing role") because the verifiers’ addresses lack the required permissions in the role mapping.
ScrvusdVerifierV1
’s verifyScrvusdByBlockHash
and verifyScrvusdByStateRoot
functions, which invoke update_price
, fail due to the missing PRICE_PARAMETERS_VERIFIER
role. Similarly, ScrvusdVerifierV2
’s verifyPeriodByBlockHash
and verifyPeriodByStateRoot
, which call update_profit_max_unlock_time
, fail without the UNLOCK_TIME_VERIFIER
role. These reverts halt the flow of Ethereum-derived scrvUSD vault parameters into the oracle.
Without verifier updates, the oracle remains frozen at its initial state (total_supply = 1
, total_idle = 1
, etc.), unable to reflect current vault parameters or adjust profit_max_unlock_time
. Price queries (price_v0
, price_v1
, price_v2
) return static, outdated values, misrepresenting scrvUSD’s actual price per share.
The oracle’s inability to update breaks its integration with stableswap-ng pools (e.g., USDC/scrvUSD, FRAX/scrvUSD), rendering these pools non-operational on secondary chains. This directly contradicts the project’s goal of enabling cross-chain scrvUSD markets with dynamic pricing
The system Rely on manual post-deployment role assignment which is likely to introduce unnecessary operational overhead and risks human error or delay
Modify the ScrvusdOracleV2 constructor to accept verifier addresses and grant roles at deployment
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.