The FeeCollector::_initializeFeeTypes function initializes the default fee types according to the protocol rule. The issue arises Swap Tax (feeTypes[6]) and NFT Royalty Fees (feeTypes[7]) fee distribution assigned value.
While the code comment indicates a "2% total" fee, the actual implementation uses 2000 basis points (20%). This creates a severe discrepancy between the documented and actual fee behavior, leading to overcharging of users.
The issue lies in the basis point calculation:
Comment states: 2% total
Actual implementation:
Buy/Sell Swap Tax
veRAACShare: 500 basis points = 5%
burnShare: 500 basis points = 5%
repairShare: 1000 basis points = 10%
Total: 2000 basis points = 20%
NFT Royalty Fees
veRAACShare: 500 basis points = 5%
repairShare: 1000 basis points = 10%
treasuryShare: 500 basis points = 5%
Total: 2000 basis points = 20%
The users are charged 20% instead of the documented 2% on swaps and NFT Royalty resulting in 10x higher fees than documented. This leads to financial losses for users and losses of protocol credibility.
Manual review
Align implementation with documentation.
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.