The RAACToken contract's tax calculation mechanism can lead to incorrect tax amounts for small token transfers due to rounding errors in the percentage calculations, potentially resulting in no taxes being collected when they should be
The vulnerabilities exist in both the _update
and burn
functions where tax calculations are performed.
When processing very small transfer amounts, the percentMul
function in the PercentageMath
library rounds down any result less than 1. This means that for small transfers, the tax calculation may yield zero, even when a tax should be applied.
For example, if taxRate == 50
and transferAmount == 99
, then the result of percentMul
will be ((99×50)+5000)/10000 = 0
.
Proof Of Concept:
Small transfers can bypass the intended tax mechanism
Loss of protocol revenue from tax collection
Potential for abuse through multiple small transfers to avoid taxes
Inconsistent tax application across different transfer amounts
Consider implementing a minimum tax amount for transfers
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.