Core Contracts

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

Non-Strict Index Update Validation in RToken

Description

The RToken contract contains a potential vulnerability in its updateLiquidityIndex function where it allows updates to the same index value, potentially leading to unnecessary gas costs and event emissions. The function only checks if the new index is less than the current index, but fails to validate against equal values.

function updateLiquidityIndex(uint256 newLiquidityIndex) external override onlyReservePool {
if (newLiquidityIndex < _liquidityIndex) revert InvalidAmount();
_liquidityIndex = newLiquidityIndex;
emit LiquidityIndexUpdated(newLiquidityIndex);
}

Impact:

  • Unnecessary gas consumption from redundant updates

  • Misleading event logs that show "updates" without actual changes

  • Potential disruption of index tracking systems relying on event logs

  • Higher indexer storage costs from duplicate events

Fix Recommendation:

Add strict equality check to prevent same-value updates

Tools Used

  • Foundry Testing Framework

  • Manual Review

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!