The updateFeeType
function in the FeeCollector
contract contains a vulnerability that prevents legitimate updates to fee types with total shares that do not equal 100%. This issue arises because certain fee types, specifically the Buy/Sell Swap
Tax and NFT Royalty Fees
, are initialized with total shares of only 2%, leading to a denial of service for valid updates on these feeTypes
.
In the updateFeeType
function, the validation check for the total fee shares is performed as follows:
This validation logic is intended to ensure that the total shares for any fee type update must equal 100% (ie 10_000 BASIS_POINTS). However, the _initializeFeeTypes()
function initializes certain fee types with total shares that are significantly less than 10000 (BASIS_POINTS). For example:
Due to this initialization, any attempt to update these fee types which should be considerably lower than 100% will fail the validation check, resulting in a denial of service for legitimate updates.
The impact of this vulnerability is significant as it prevents the protocol from updating fee types that are intentionally designed to have lower total shares. This can lead to:
Inability to adjust fee distributions for the Buy/Sell Swap Tax and NFT Royalty Fees.
Potential misalignment of fee structures with the protocol's evolving economic model.
Manual code review
Revise Validation Logic: Modify the validation logic in the updateFeeType
function to allow updates for feeType[6] & feeType[7] that are initialized with total shares less than 100%. This could involve adding a whitelist of fee types that are permitted to have lower total shares.
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.