Core Contracts

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

RAACPrimeRateOracle Unvalidated Input

Summary

The RAACPrimeRateOracle accepts any prime rate value from the Chainlink oracle without validation bounds, allowing manipulation of protocol interest rates through malicious or erroneous off-chain data.

Vulnerability Details

No bounds checks on the prime rate from off-chain, allowing extreme values (e.g., 0 or 1e30).

RAACPrimeRateOracle.sol#_processResponse

function _processResponse(bytes memory response) internal override {
lastPrimeRate = abi.decode(response, (uint256));
lastUpdateTimestamp = block.timestamp;
lendingPool.setPrimeRate(lastPrimeRate);
emit PrimeRateUpdated(lastPrimeRate);
}

Attack Path, let's say.

  1. Oracle reports extreme rate (0 or 1e30)

  2. Rate accepted without validation

  3. LendingPool interest calculations distorted

  4. Protocol economics break down

Impact

Distorted interest rates, protocol insolvency.

Tools Used

manual

Recommendations

Add sanity checks (for example, require(lastPrimeRate > 0 && lastPrimeRate < MAX_RATE)).

// Add constants
uint256 private constant MIN_PRIME_RATE = 1e16; // 1% APR
uint256 private constant MAX_PRIME_RATE = 1e18; // 100% APR
function _processResponse(bytes memory response) internal override {
uint256 newRate = abi.decode(response, (uint256));
// Validate rate is within acceptable economic bounds
if (newRate < MIN_PRIME_RATE) revert RateTooLow(newRate);
if (newRate > MAX_PRIME_RATE) revert RateTooHigh(newRate);
lastPrimeRate = newRate;
lastUpdateTimestamp = block.timestamp;
lendingPool.setPrimeRate(lastPrimeRate);
emit PrimeRateUpdated(lastPrimeRate);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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