RAACToken contract is an implementation of ERC20, so it inherits the functions from the ERC20 standard. Most of the functions are overriden to make the customization as intended or as per the design suitable for this protocol. However, the issue lies in the burn operation. So as per the natspec, docs and even as per the code there is a taxation mechanism for burn and swap mechanism.
When a user calls the burn function, the calculated taxAmount is transferred to the feeCollector. This transfer triggers the _update function, reapplying the swap and burn taxes on the taxAmount. As a result, the taxAmount is taxed multiple times, leading to higher effective taxation than intended.
So as per the burn function, the tax amount is deducted from the amount specified. The taxAmount is then transferred to feeCollector, however things takes a turn around when _transfer calls the underlying _update
Although_update has the rule to not take tax when burn() is called. However, while transferring the burn tax to feeCollector, it submits tax on tax. Sounds funny, but this is actually what happens. You can check the clause below the if.
More amount of tax, is deducted and also uneven tax is submitted to different actors - feeCollector, burn, and to fee collector remaining tax which makes the state update of supply insufficient and wrong.
Manual Review
Make the transfer to different actors specifically in the functions rather than in _update.
This is by design, sponsor's words: Yes, burnt amount, done by whitelisted contract or not always occur the tax. The feeCollector is intended to always be whitelisted and the address(0) is included in the _transfer as a bypass of the tax amount, so upon burn->_burn->_update it would have not applied (and would also do another burn...). For this reason, to always apply such tax, the burn function include the calculation (the 2 lines that applies) and a direct transfer to feeCollector a little bit later. This is done purposefully
This is by design, sponsor's words: Yes, burnt amount, done by whitelisted contract or not always occur the tax. The feeCollector is intended to always be whitelisted and the address(0) is included in the _transfer as a bypass of the tax amount, so upon burn->_burn->_update it would have not applied (and would also do another burn...). For this reason, to always apply such tax, the burn function include the calculation (the 2 lines that applies) and a direct transfer to feeCollector a little bit later. This is done purposefully
This is by design, sponsor's words: Yes, burnt amount, done by whitelisted contract or not always occur the tax. The feeCollector is intended to always be whitelisted and the address(0) is included in the _transfer as a bypass of the tax amount, so upon burn->_burn->_update it would have not applied (and would also do another burn...). For this reason, to always apply such tax, the burn function include the calculation (the 2 lines that applies) and a direct transfer to feeCollector a little bit later. This is done purposefully
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.