Core Contracts

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

No staleness check for lastPrimeRate in `getPrimeRate()`

Summary

Vulnerability Details

RAACPrimeRateOracle.sol has 2 state variable i.e lastPrimearte and lastUpdateTimestamp.

both of these updated in _processResponse()internal function which is called from BaseChainlinkFunctionsOracle.sol

But point is `RAACPrimeRate :: getPrimeRate()` fetch lastprimeRate and return it, it never checks for staleness of this value

function getPrimeRate() external view returns (uint256) { // @audit-issue no staleness check
return lastPrimeRate;
}

https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/oracles/RAACPrimeRateOracle.sol#L47-L49

Impact

lastPrimeaRate could be a stale value(old value)

Tools Used

manual review

Recommendations

Contract should implement a heartbeat (time period ) during which this lastPrimeRateis valid and after completion of heartbeat period again request for new value.

When getPrimerate() function called it lastUpdateTimestamp should check against heartbeat

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 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 3 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.