Core Contracts

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

getTotalValue() does not show real total value

Summary

getTotalValue() is a deceptive function because of the way the contract is written

Vulnerability Details

This function can be deceptive if anyone can deposit any token to the contract, even spammy ones

https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/collectors/Treasury.sol

/**
* @notice Gets total value held by treasury
* @return Total value across all tokens
*/
function getTotalValue() external view override returns (uint256) {
return _totalValue;
}

Impact

does not show the real value the contract holds

Tools Used

manual

Recommendations

fix the logic as stated in other issues

Updates

Lead Judging Commences

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

Treasury::deposit increments _totalValue regardless of the token, be it malicious, different decimals, FoT etc.

Support

FAQs

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

Give us feedback!