Zero-Address Assignment Risk
The function fails to validate that the newOracle
address is non-zero (address(0)
). Assigning a zero address could disrupt critical contract functionality (e.g., oracle-dependent operations like interest rate calculations), leading to system failures or fund lockups.
Missing State Change Event
The modification of the primeRateOracle
state variable lacks an emitted event. This omission violates transparency best practices, hinders off-chain monitoring, and complicates auditing or debugging of historical changes.
Operational Failure:
If primeRateOracle
is set to address(0)
, any function relying on this oracle (e.g., fetching interest rates, validating transactions) will fail. This could halt core contract functionality, such as loan processing, reward distributions, or price calculations.
Financial Loss:
In systems where the oracle is critical (e.g., DeFi protocols), invalid oracle addresses could lock user funds, disrupt withdrawals, or cause incorrect financial computations (e.g., interest accrual).
manual review
`event PrimeRateOracleUpdated(address indexed oldOracle, address indexed newOracle);
function setPrimeRateOracle(address newOracle) external onlyOwner {
require(newOracle != address(0), "Oracle address cannot be zero");
primeRateOracle = newOracle
emit PrimeRateOracleUpdated(primeRateOracle, newOracle);
}`
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.