https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/boost/BoostController.sol#L385-L395
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/boost/BoostController.sol#L88-L131
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/boost/BoostController.sol#L141-L169
The BoostController contract relies on the updateTotalWeight function to calculate voting power and total weight for boost calculations. However, the updateTotalWeight function incorrectly assumes that the BoostController contract itself has locked RAAC tokens to receive veRAAC tokens and voting power. Since the BoostController contract does not lock any RAAC tokens, the voting power and weight calculations will always return 0, leading to incorrect boost calculations.
The updateTotalWeight function is used in two critical functions (calculateBoost and _calculateBoost) to determine the boost multiplier for users. However, the function incorrectly assumes that the BoostController contract has locked RAAC tokens to receive veRAAC tokens and voting power. As a result:
Voting Power is Always 0: The BoostController contract does not lock any RAAC tokens, so its voting power will always be 0.
Incorrect Boost Calculations: The boost calculations in calculateBoost and _calculateBoost rely on the voting power and weight returned by updateTotalWeight. Since these values are incorrect, the boost calculations will also be incorrect.
The issue lies in the following lines of the updateTotalWeight function:
veToken.getLockPosition(address(this)).amount: This will return 0 because the BoostController contract has not locked any RAAC tokens.
veToken.getVotingPower(address(this), block.timestamp): This will return 0 because the BoostController contract has no veRAAC tokens or voting power.
User Requests Boost: A user requests a boost calculation using the calculateBoost or _calculateBoost function.
Incorrect Voting Power: The updateTotalWeight function returns 0 for voting power and weight because the BoostController contract has no veRAAC tokens.
Incorrect Boost Calculation: The boost calculation is based on incorrect values, leading to an incorrect boost multiplier.
Incorrect Boost Calculations: The boost calculations in calculateBoost and _calculateBoost will be incorrect due to the incorrect voting power and weight values returned by updateTotalWeight.
Operational Inefficiency: The protocol's boost mechanism becomes unreliable, as it cannot provide meaningful boost calculations.
Manual Code Review: The vulnerability was identified through a manual review of the BoostController contract.
Lock RAAC Tokens in BoostController:
Lock RAAC tokens in the BoostController contract to receive veRAAC tokens and voting power. This will ensure that the updateTotalWeight function returns meaningful values.
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.