Summary
Fee types 6 and 7 in initializeFeeTypes misrepresent percentages (0.5% and 1%) as 5% and 10% due to incorrect basis point values.
Vulnerability Details
BASISPOINTS is assigned with 10000 which represents 100% but the initializeFeeTypes
for 'feeTypes[6]' and 'feeTypes[7]' setting the parameters are wrong setting 500 as 0.5% and 1_000 as 1% when they represent 5% and 10% respectively as it can be seen with the rest of the params above it (e.g., veRAACShare: 8000, // 80%, correct)
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/collectors/FeeCollector.sol#L327-L394
uint256 public constant BASIS_POINTS = 10000;
* @dev Initializes default fee types according to protocol rules
*/
function _initializeFeeTypes() internal {
feeTypes[0] = FeeType({
veRAACShare: 8000,
burnShare: 0,
repairShare: 0,
treasuryShare: 2000
});
feeTypes[1] = FeeType({
veRAACShare: 7000,
burnShare: 0,
repairShare: 0,
treasuryShare: 3000
});
feeTypes[2] = FeeType({
veRAACShare: 6000,
burnShare: 0,
repairShare: 0,
treasuryShare: 4000
});
feeTypes[3] = FeeType({
veRAACShare: 5000,
burnShare: 0,
repairShare: 2000,
treasuryShare: 3000
});
feeTypes[4] = FeeType({
veRAACShare: 6000,
burnShare: 0,
repairShare: 2000,
treasuryShare: 2000
});
feeTypes[5] = FeeType({
veRAACShare: 7000,
burnShare: 0,
repairShare: 0,
treasuryShare: 3000
});
PROBLEMATIC ONES
feeTypes[6] = FeeType({
veRAACShare: 500,
burnShare: 500,
repairShare: 1000,
treasuryShare: 0
});
feeTypes[7] = FeeType({
veRAACShare: 500,
burnShare: 0,
repairShare: 1000,
treasuryShare: 500
});
}
Impact
the fees are being set to 10% thinking they are 1% and 5% thinking it's 0.5%
Tools Used
manual
Recommendations
change the BPS to from type 6 and 7 to match the rest so they represent the correct percentage