Core Contracts

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

Non-Transferrable veRaac Tokens Prevent Staking and Rewards Distribution in `RAACGauge.sol`

Summary

RAACGauge.sol is designed to stake veRaac tokens [ref] to earn additional rewards. However, since veRaac is non-transferrable, the stake(...) function is effectively unusable. This also causes rewardPerTokenStored to remain at zero indefinitely.

Vulnerability Details

veRAACToken is a non-transferrable token that represents a user's voting power within the RAAC ecosystem. When stake(...) is called, veRaac tokens should be transferred to the gauge (link).

Based on the documentation and test cases, we can confirm that stakingToken is veRaac. However, in the tests, a mock contract representing veRAAC is used, but it is incorrectly implemented. Due to veRaac being non-transferrable, the staking mechanism is fundamentally broken.

Impact

Since the stake(...) function cannot be executed, the _totalSupply storage variable will always remain zero. Consequently, the getRewardPerToken() function will always return zero, preventing any rewards from being distributed. As a result:

  • RAAC rewards allocated for distribution will be lost.

  • The contract will not function as intended.

Tools Used

Recommendations

The appropriate solution depends on the intended design of the gauge. Potential fixes include:

  • Making veRaac transferrable, though this could introduce additional security risks.

  • Overriding the totalSupply(...) function to return the total voting power at a specific period, allowing rewards to be distributed correctly.

Updates

Lead Judging Commences

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

Users cannot stake into BaseGauge because veRAACToken is non-transferrable, breaking core gauge staking functionality

According to the sponsor `The required stakingToken is not the veToken just the incitivised token being staked into the contract.`

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

Users cannot stake into BaseGauge because veRAACToken is non-transferrable, breaking core gauge staking functionality

According to the sponsor `The required stakingToken is not the veToken just the incitivised token being staked into the contract.`

Support

FAQs

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