Core Contracts

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

removeBoostDelegation() Uses Wrong Address and Fails to Reduce Pool Power

Relevant GitHub Links

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/governance/boost/BoostController.sol#L242-L258

Summary

removeBoostDelegation() uses incorrect msg.sender address to access pool (it uses msg.sender address instead of pool address) and then fails to subtract power due to a non-zero check against uninitialized mapping.

Vulnerability Details

// 1. Uses msg.sender instead of pool address
PoolBoost storage poolBoost = poolBoosts[msg.sender];
// 2. Check prevents power reduction since poolBoost.totalBoost is always 0
if (poolBoost.totalBoost >= delegation.amount) {
poolBoost.totalBoost -= delegation.amount;
}
// Same here
if (poolBoost.workingSupply >= delegation.amount) {
poolBoost.workingSupply -= delegation.amount;

Impact

  • Pool power and working supply accounting remains inflated after delegations are removed

  • Results in incorrect boost calculations and reward distribution

Tools Used

Manual Review

Recommendations

Use correct pool address and remove unnecessary checks:

PoolBoost storage poolBoost = poolBoosts[pool]; // Use correct pool address
poolBoost.totalBoost -= delegation.amount;
poolBoost.workingSupply -= delegation.amount;
Updates

Lead Judging Commences

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

BoostController removes pool boost on delegation removal without adding it on delegation creation, leading to accounting inconsistencies and potential underflows

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

BoostController removes pool boost on delegation removal without adding it on delegation creation, leading to accounting inconsistencies and potential underflows

Support

FAQs

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

Give us feedback!