Core Contracts

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

Unrestricted Emission Rate Update Function Leading to Race Condition Exploitation

Summary

The updateEmissionRate function in the RAACMinter contract is publicly callable without any access restrictions. This lack of control enables any user to trigger the update, potentially creating a race condition that can be exploited for personal gain.

Vulnerability Details

The updateEmissionRate function is designed to adjust the dynamic emission rate based on system utilization. However, it is only protected by the whenNotPaused modifier and does not incorporate any role-based access control. As a result, any external actor can call this function at any time. This unrestricted access can lead to a race condition where a user might call updateEmissionRate immediately before or during interactions with related functions (such as tick()), thereby affecting the emission rate calculation to their advantage.

function updateEmissionRate() public whenNotPaused {
if (emissionUpdateInterval > 0 && block.timestamp < lastEmissionUpdateTimestamp + emissionUpdateInterval) {
revert EmissionUpdateTooFrequent();
}
uint256 newRate = calculateNewEmissionRate();
emissionRate = newRate;
lastEmissionUpdateTimestamp = block.timestamp;
emit EmissionRateUpdated(newRate);
}

Impact

If exploited, this vulnerability could allow malicious users to manipulate the emission rate to their benefit.

Tools Used

  • Manual code review

Recommended Mitigation

  • Automate Updates: Consider automating the emission rate update process using off-chain mechanisms (such as Chainlink Keepers) to remove the dependency on external calls that could be exploited.

  • Restrict Access: Modify the updateEmissionRate function to include access control (for example, using a role-based modifier like onlyRole(UPDATER_ROLE)) so that only authorized entities can trigger an update.

Updates

Lead Judging Commences

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

Support

FAQs

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