Core Contracts

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

Faulty delegateBoost() and removeBoostDelegation() mechanics leads to diminished rewards

Description

The expected flow for delegation and undelegation of boost is the following with ❌ showing the step missing in the current implementation:

User A (has veToken) ----'delegateBoost()' to----> Pool X
1. Records delegation
2. Pool should get boost increase based on delegated veToken
- 'poolBoost.totalBoost' and 'poolBoost.workingSupply' is increased by the 'delgation.amount' added ❌
3. Boost affects pool's reward calculations
4. When undelegated ('removeBoostDelegation()' called by Pool X):
- Pool loses delegated boost
- Pool rewards recalculated
- 'poolBoost.totalBoost' and 'poolBoost.workingSupply' is decreased by the 'delgation.amount' removed

poolBoost.totalBoost and poolBoost.workingSupply are decreased when undelegating but are never increased when delegating. Over time, this reduces the boost and hence the rewards significantly.

Impact

Users get less than intended rewards. Gets worse over time.

Mitigation

poolBoost.totalBoost and poolBoost.workingSupply should be increased by the delgation.amount during delegateBoost().

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 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.