Whenever RAAC tokens are transferred to non-whitelisted accounts, a tax is deducted from the transferred amount. This tax is supposed to be accounted for in the FeeCollector contract via the collectFee(...) function. However, this does not happen, meaning that the only way to retrieve these funds is through emergencyWithdraw(...), which is not the primary function of the collector.
Each time RAAC tokens are transferred, the update(...) function is executed:
In the first super._update(...) call, a portion of the tax is transferred to the FeeCollector. However, the FeeCollector is supposed to distribute RAAC tokens to veRAAC holders according to the following tax distribution structure:
This distribution is handled by the distributeCollectedFees() function, which calculates the total fees based on the values stored in collectedFees:
However, because the tax is transferred directly to the FeeCollector without being accounted for, none of these storage variables are updated. As a result, the contract does not recognize the collected tax, rendering the reward distribution mechanism ineffective.
The swap tax, which should be accounted for in the FeeCollector, is never properly recorded.
The FeeCollector cannot distribute rewards to veRAAC holders as intended.
Users will lose their expected share of rewards.
The only way to access these funds is via emergencyWithdraw(...), which is not the intended use case.
N/A
To ensure proper tax accounting and reward distribution, the RAAC token contract should explicitly call the collectFee(...) function when processing a transfer. However, due to the current design limitations, a different function should be implemented to correctly account for the tax upon RAAC 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.