The FeeCollector::_initializeFeeTypes
function initializes Swap Tax (type 6
) and NFT Royalties (type 7
) fee types with distribution parameters that sum to only 2,000
basis points (20%) instead of the required 10,000
basis points (100%). This causes 80% of the fees collected under these types to be misdirected to the treasury, violating the intended distribution ratios and undermining the protocol’s economic model.
The contract enforces that the sum of distribution shares (veRAACShare, burnShare, repairShare, treasuryShare) must equal BASIS_POINTS
(10,000). This invariant is checked in the updateFeeType
function for updates but is bypassed during initial fee type setup.
Incorrect Initialization:
In the _initializeFeeTypes
function, fee types 6 and 7 are set with distribution parameters that total only 2,000. For example:
Fee Type 6 (Swap Tax):
veRAACShare: 500
burnShare: 500
repairShare: 1000
treasuryShare: 0
Total: 500 + 500 + 1000 + 0 = 2000
Fee Type 7 (NFT Royalties):
veRAACShare: 500
burnShare: 0
repairShare: 1000
treasuryShare: 500
Total: 500 + 0 + 1000 + 500 = 2000
Distribution Logic Impact:
Within the _calculateDistribution
function, the fee amount for each fee type is scaled by its distribution parameters. Because fee types 6 and 7 only allocate 20% of the fee (2000/10000), the intended proportions for veRAAC holders, burning, and repair funds are significantly reduced. The remaining 80% of each fee type is then allocated to the treasury via the remainder handling logic.
veRAAC
holders and the mechanisms for token burning and repair funds, receive only a fraction of the fees as originally intended. This under-allocation can undermine participant incentives.
Manual Review
Update the initialization of fee types 6 and 7 in the _initializeFeeTypes
function so that the sum of their distribution parameters equals BASIS_POINTS (10,000). This will ensure that the fee distribution mechanism works as intended.
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.