Core Contracts

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

Missing Zero Price Check

Summary

not checking if _amount is greater than 0

Vulnerability Details

should check if _amount is greater than 0 in case something with the oracle went wrong

https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/primitives/RAACHousePrices.sol#L49-L56

function setHousePrice(
uint256 _tokenId,
uint256 _amount
) external onlyOracle {
tokenToHousePrice[_tokenId] = _amount;
lastUpdateTimestamp = block.timestamp;
emit PriceUpdated(_tokenId, _amount);
}

Impact

if _amount is 0 something wrong might have happened to the oracle, checking it can prevent a 0 price.

Tools Used

manual

Recommendations

check if _amount > 0

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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