The burn function in RAACToken contract is defined as follows:
This function might be used by users to burn RAAC tokens, or by the FeeCollector contract that uses it as part of its process distribution mechanism:
The problem arises because:
The FeeCollector contract has its own mechanism to handle fee distribution, with 4 shareholders: veRAAC share, burn share, repair fund share, treasury share
burn function itself has a way to handle tax payment, which includes burning and transfer to fee collector
When the FeeCollector wants to process the distribution of the fees it has collected since last distribution, we expect shares[1]to be burned entirely, as it is the burn share.
The problem is that raacToken.burn(shares[1])call will indeed burn amount - taxAmount, but taxAmount will be transferred to the feeCollector itself with _transfer(msg.sender, feeCollector, taxAmount);.
The burn implementation should be modified to take into account that when the Fee Collector is msg.sender, the entire amount should be burned.
The impact of this issue is medium is it prevents the FeeCollector contract to correctly burn shares[1]amount of tokens.
Manual review
Make sure to correctly handle the specific case we described to make sure the full amount is burned:
This way, we ensure that if feeCollector is the sender, the entire amount is burned as expected.
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.