The FeeCollector
contract initializes fee distribution parameters using basis points (10000 = 100%). However, the swapTaxes (feeTypes[6]
) and nftRoyalties (feeTypes[7]
) are incorrectly set to 2000
basis points (20%
) instead of 200
basis points (2%
). This results in an excessive fee distribution, potentially leading to higher than intended deductions from transactions.
In the constructor of the FeeCollector.sol
contract, this is the constructor:
This internally calls the _initializeFeeTypes
function at: https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/collectors/FeeCollector.sol#L330-L394
The _initializeFeeTypes()
function defines different fee types with their respective allocations.
Swap Tax (feeTypes[6]
) should sum up to 2%
(200 basis points
) but is set to 20%
(2000 basis points
):
Incorrect Total: 500 + 500 + 1000 = 2000 (20%) ❌
Similarly, NFT Royalties (feeTypes[7]
) should sum up to 2%
(200 basis points
) but is set to 20%
(2000 basis points
):
Incorrect Total: 500 + 0 + 1000 + 500 = 2000 (20%) ❌
The issue originates from an incorrect assignment of basis points, multiplying the intended values by 10.
Transactions involving swaps and NFT royalties will incur significantly higher fees than expected.
This will lead to user dissatisfaction and loss of trust in the protocol.
Affected fee distributions will cause misallocation of funds, leading to potential economic imbalances in the system.
Manual Review
Modify _initializeFeeTypes()
to correctly allocate 200 basis points (2%) instead of 2000 basis points (20%).
Fixed Swap Tax (feeTypes[6]):
✅ Total = 50 + 50 + 100 = 200 (2%)
Fixed NFT Royalties (feeTypes[7]):
✅ Total = 50 + 0 + 100 + 50 = 200 (2%)
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.