The FeeCollector contract incorrectly normalizes fee distributions for Swap Tax and NFT Royalty types, causing their distributions to be 50x larger than intended. This is due to a mismatch between fee initialization values (20% total) and distribution logic that assumes 100% total.
In FeeCollector.sol, fee types 6 (Swap Tax) and 7 (NFT Royalty) are initialized with shares totaling 2000 basis points (20%):
However, the distribution logic in _calculateDistribution() treats these percentages as if they should total 10000 basis points (100%):
This normalization error results in:
0.5% becoming 25%
1.0% becoming 50%
Swap Tax and NFT Royalty distributions will be 50x larger than intended
Severe misallocation of protocol fees
Direct financial impact on all fee recipients
Potential protocol insolvency if unchecked
Manual Review
Choose one of these solutions:
Adjust initialization values to total 10000 basis points:
Add special handling for these fee types:
Create separate distribution logic for percentage-based vs basis point fees.
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.