_updateConvictionScore() function returns convictionDelta and governanceDelta which need to be used immediately in a call to _updateConvictionTotals (convictionDelta, governanceDelta) for updating the conviction totals of conviction and governance-enabled conviction for the entire FairSide network.
This updating of totals after a call to _updateConvictionScore() is done on Line70 in _beforeTokenTransfer() and on Line367 in updateConvictionScore() of ERC20ConvictionScore.sol.
However, the return values of _updateConvictionScore() are ignored on Line284 in tokenizeConviction() and are not used to update the totals using _updateConvictionTotals(convictionDelta, governanceDelta).
The impact of this is that when a user tokenizes their conviction score, their conviction deltas are updated and recorded (only if the funds locked are zero, which is incorrect and reported separately in a different finding), but the totals are not updated. This leads to incorrect accounting of TOTAL_CONVICTION_SCORE and TOTAL_GOVERNANCE_SCORE, which are used to calculate tributes, and therefore will lead to incorrect tribute calculations.
EXAMPLE:
Recommend using the return values of the _updateConvictionScore() function (i.e. convictionDelta and governanceDelta) on Line284 of ERC20ConvictionScore.sol, and then use them in a call to _updateConvictionTotals(convictionDelta, governanceDelta).
fairside-core (FairSide) confirmed:
