Whenever there is a transfer or burn of RAACTokens we have a fee that needs to be paid, the logic is _update function of the RAACToken contract. This fee should then be transfered to theFeeCollector where we can distribute it along with other fees as rewards to veRAAC token holders, distribute some amount to tresury and etc. The main issue is that we directly update the balance of the FeeCollectorwith the fee amount instead of calling the collectFee function that accuretly reflects collected fees.
Due to incorrect approch to update the balance of FeeCollector with transfer fees from RAACToken tokens we do not distribute the accumulated amount when distribution of fees is called on the FeeCollector. Instead of just updating the balance of the FeeCollector address with the fee amount for the RAACTokens transfer, we should call something similar to this feeCollector.collectFee(from, totalTax - burnAmount, 0) which accuratly updates the amount of fees collected. We coul either pass as a second argument "0" or "4" depending if we consider this to be a protocolFees or a mintRedeemFees. NOTE THAT THIS WILL NOT WORK CORRECLTY CURRENTLY AS THE from value is not supported by the collectFee function, it uses the msg.sender to collect the provided amount, in the current logic the RAACToken contract which is not correct for this scenario.
Transfer and burn fees are not reflected when we do a distribution of fees in the FeeCollector contract. This in turn would mean that veRAAC token holders will receive less rewards than they should have when the distribution is executed.
Manual review
Instead of updating directly the balance of the FeeCollector with the fee amount of the RAACToken transfer/burn, create a new function/modify the collectFees function of the FeeCollector so that we can pass an account from which to transfer the RAACTokens and reflect them for future distributions.
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.