Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

[M-05] Stale Prime Rate Due to Uncalled Internal Function

Description:
The internal function RAACPrimeRateOracle::_processResponse is responsible for updating the lastPrimeRate state variable. However, this function is not invoked by any other function within the contract. As a result, lastPrimeRate will never be updated after initialization (defaulting to 0), rendering getPrimeRate() ineffective and the lending pool's prime rate stale.

Impact:

  • Critical contract functionality (e.g., interest rate calculations via lendingPool.setPrimeRate) will rely on an incorrect prime rate (0), leading to protocol-wide miscalculations.

  • External systems or users depending on getPrimeRate() will receive outdated/invalid data, potentially causing financial losses or misinformed decisions.

Proof of Concept:

  1. The _processResponse function is internal and override but has no in-contract callers.

  2. Without external triggers (e.g., inherited contracts), lastPrimeRate remains uninitialized (0).

  3. getPrimeRate() will persistently return 0, and lastUpdateTimestamp will never reflect actual updates.

Recommended Mitigation:

  • Option 1: Integrate a mechanism to call _processResponse (e.g., a scheduled keeper or oracle update function).

  • Option 2: Remove _processResponse and associated logic if the prime rate is obsolete.

  • Additional Suggestion: If the function is intended for inheritance, document its purpose and ensure derived contracts invoke it properly.

// Example Fix: Add a function to trigger updates (if applicable)
function updatePrimeRate(bytes calldata response) external onlyOwner {
_processResponse(response);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::getNFTPrice or getPrimeRate doesn't validate timestamp staleness despite claiming to, allowing users to exploit outdated collateral values during price drops

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::getNFTPrice or getPrimeRate doesn't validate timestamp staleness despite claiming to, allowing users to exploit outdated collateral values during price drops

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.