The contract allows the total tax (swap + burn) to exceed the intended maximum of 10% (1000 basis points). While individual tax rates (swapTaxRate and burnTaxRate) are capped at 10% each, their sum can reach 20%, violating the invariant that total taxes should not exceed 10%
contract RAACToken is ERC20, Ownable, IRAACToken {
using PercentageMath for uint256;
The constructor validates individual rates but not their sum. For example:
initialSwapTaxRate = 10%, initialBurnTaxRate = 10% → total tax = 20%.
When updating a tax rate, the contract ensures the new rate is ≤ 10% but does not check the combined total with the other rate.
If swapTaxRate = 10% and burnTaxRate = 10%, totalTax = 20%.
The original code allowed the total tax to exceed the intended 10% cap by not validating the sum of swapTaxRate and burnTaxRate. This will squeeze users of the contract to pay higher than intended.
Foundry
Enforce a total tax cap by checking swapTaxRate + burnTaxRate ≤ MAX_TAX_RATE in the constructor and _setTaxRate
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.