BaseGauge::setBoostParameters function set the maxBoost and minBoost by the onlyController when we can see it doesn't check the if the maxBoost > minBoost or minBoost < maxBoost
RAACGauge and RWAGauge inherits the BaseGauge and deploys contract and it provides the maxBoost and minBoost for BoostCalculation [BaseGauge::_applyBoost()](https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/gauges/BaseGauge.sol#L246) but this calculation will only possible if the [maxBoost value greater than minBoost](https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/libraries/governance/BoostCalculator.sol#L89).
Where minBoost should be lower than maxBoost. When user create checkpoint for reward Calculation SLOC#599-604 , stake SLOC#257-267, withdraw SLOC#269-280 or try to claim reward with getReward SLOC#323-347 it will first execute the updateReward(msg.sender) helps in user to Update reward state for an account state.reward is calculate for user to get users current weight including boost SLOC#584, SLOC#594.
This function _applyBoost() will use the minBoost and maxBoost value stored by the controller in the contract using this BaseGauge::setBoostParameters SLOC#535-543.
and will calculate the Boost With Provided Params set in the function call of the _calculateBoost() SLOC#246
After that BoostCalculator::calculateBoost does this calculation SLOC#89.
in our case lets say maxboost: 25000 and minBoost: 30000, contract is deployed with version ^0.8.19 this already checks for the underflow and overflow value in contract and revert. boostRange value will lead to underflow and calculation fails. Reward can't be calculated due constantly failing of the function.
BaseGauge::setBoostParameters does not check for the maxBoost is greater than the minBoost leading underflow on the Calcuation of the Boost. this function does not verify that min is less than max, which should be a strongly held invariant.
The lack of validation for minBoost < maxBoost can cause incorrect calculations, potentially leading to underflows or unexpected results. It breaks the assumption that minBoost should always be less than maxBoost, leading to logical errors.
Manual Review
Consider adding a check that _minBoost < _maxBoost in BaseGauge::setBoostParameters.
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.