_calculateReward in GaugeCOntroller.sol will return wrong amount because of _CalculateRWAEmissions() and _CalculateRAACEmission()
the _calculateReward is not updated bades on the actual emission rate, but are calculated on example value ->
function _calculateReward(address gauge) internal view returns (uint256) {
Gauge storage g = gauges[gauge];
uint256 totalWeight = getTotalWeight();
if (totalWeight == 0) return 0;
uint256 gaugeShare = (g.weight * WEIGHT_PRECISION) / totalWeight;
uint256 typeShare = (typeWeights[g.gaugeType] * WEIGHT_PRECISION) / MAX_TYPE_WEIGHT;
uint256 periodEmission = g.gaugeType == GaugeType.RWA ? _calculateRWAEmission() : _calculateRAACEmission();
return (periodEmission * gaugeShare * typeShare) / (WEIGHT_PRECISION * WEIGHT_PRECISION);
}
* @notice Calculates RWA emission rate
* @dev Monthly emission rate for RWA gauges
* @return Monthly emission amount
*/
function _calculateRWAEmission() internal view returns (uint256) {
return 1000000 * 10 ** 18;
}
* @notice Calculates RAAC emission rate
* @dev Weekly emission rate for RAAC gauges
* @return Weekly emission amount
*/
function _calculateRAACEmission() internal view returns (uint256) {
return 250000 * 10 ** 18;
}
The _CalculateRWAEmissions() and _CalculateRAACEmission() should return the actual emission rate