Core Contracts

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

Incorrect Pool Boost Retrieval in `removeBoostDelegation`

Summary

A vulnerability was identified in the removeBoostDelegation function, where the function incorrectly retrieves pool boost information using msg.sender instead of the actual pool address. This results in an unintended zeroing of values, leading to incorrect boost calculations and an inconsistent contract state.

Vulnerability Details

The function retrieves the PoolBoost struct using poolBoosts[msg.sender], assuming that msg.sender represents the pool address. However, msg.sender in this context is the user calling the function, not the pool itself. Consequently, poolBoosts[msg.sender] returns a zero-initialized PoolBoost struct, and any updates made to totalBoost and workingSupply are ineffective since they do not reference the correct pool.

Affected code: BoostController::removeDelegation

Impact

This flaw leads to:

  • Incorrect accounting of totalBoost and workingSupply, rendering boost calculations state to be incorrect.

  • A state inconsistency where delegations are removed but the pool’s boost data remains incorrect.

Tools Used

  • Manual code review

Recommendations

  • Replace poolBoosts[msg.sender] with poolBoosts[pool] to ensure the correct pool's boost data is updated.

Updates

Lead Judging Commences

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

BoostController's delegation system fundamentally broken due to missing pool associations, treating recipient addresses as pools and never properly updating pool boost metrics

Support

FAQs

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

Give us feedback!