The FeeCollector.sol contract initializes two fee types (Swap Tax and NFT Royalty) with incorrect basis points values that sum to 20% instead of the intended 2%. Additionally, the updateFeeType function enforces that all fee type parameters must sum to 100% (10000 basis points), making it impossible to update these specific fee types after initialization.
In _initializeFeeTypes, two fee types are initialized with incorrect values:
However, updateFeeType enforces that all parameters must sum to BASIS_POINTS (10000):
This creates two issues:
The fees are charging 20% instead of the documented 2%
These fee types cannot be updated through updateFeeType since they're intended to sum to 200 basis points (2%) but the function requires 10000 basis points (100%)
High:
Users are charged 10x the intended fee rate (20% vs 2%)
Protocol operators cannot update these fee types through normal governance mechanisms
High:
Every swap transaction (fee type 6)
Every NFT royalty collection (fee type 7)
Any attempt to update these fee types
N/A - Sufficient information in Vulnerability Details
Fix _initializeFeeTypes to the intended fee amount:
Modify updateFeeType to accept a target total for each fee type rather than enforcing 100%; this will allow more flexible changes and also allow updates to the swap fee and NFT royalty distributions:
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.