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.
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.
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.
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.
According to the sponsor `The required stakingToken is not the veToken just the incitivised token being staked into the contract.`
According to the sponsor `The required stakingToken is not the veToken just the incitivised token being staked into the contract.`
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.