The fee calculation logic for Buy/Sell Swap Tax and NFT Royalty Fees is incorrect. The total percentages do not add up correctly based on the BASIS_POINTS (10000 = 100%). This could lead to incorrect fee deductions and unexpected financial behaviors in the contract.
Affected Code Section:
Bug Details:
Buy/Sell Swap Tax Calculation Error:
The total allocation of fees should sum up to 2% (200 BASIS_POINTS), but currently, the sum is:
veRAACShare: 500 (0.5%)
burnShare: 500 (0.5%)
repairShare: 1000 (1.0%)
treasuryShare: 0
Total: 2000 BASIS_POINTS (20%) instead of 200 BASIS_POINTS (2%)
NFT Royalty Fees Calculation Error:
The total allocation of fees should sum up to 2% (200 BASIS_POINTS), but currently, the sum is:
veRAACShare: 500 (0.5%)
burnShare: 0
repairShare: 1000 (1.0%)
treasuryShare: 500 (0.5%)
Total: 2000 BASIS_POINTS (20%) instead of 200 BASIS_POINTS (2%)
The contract is deducting 20% instead of 2% from transactions, significantly affecting users.
If left unresolved, this could lead to loss of funds, legal compliance issues, and reputational damage.
Manuel Review
Suggested Fix:
The correct calculations should use BASIS_POINTS correctly, ensuring the total per fee type is within the intended 2% (200 BASIS_POINTS). Example correction:
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.