The totalDistributed in the FeeCollector.sol is a storage variable that represents Total tokens distributed historically meaning that this is supposed to be updated everytime the fees/tokens are distributed among the different FeeTypes or accoridng to the protocol rules
When the distributeCollectedFees is called what it does is that Distributes collected fees according to protocol rules and Calculates shares for veRAAC holders, burn, repair fund and treasury. After calculating fees it calls an internal function i.e processDistributions what this does is that it takes the calculated shares into account and transfers them accordingly, like some part of shares is for the veRAACHolders if any, some of it is for the treasury and some for the repairFund. However the totalDistributed var mentioned above is only updated when there are veRAACToken holders but when in these two lines when the tokens are transferred to the treasury and repairFund, the totalDistributed var is not being updated even when it is supposed to be. As that state var tracks and accounts for the total tokens that were or are distributed historically throughout.
Update the totalDistributed state whenever there is a transfer of tokens or fees as that is supposed to keep trac of the tokens distributed throughout
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.