Submitted by leastwood
Conviction scores are calculated by taking the users balance and multiplying it by the time elapsed. This score is updated upon each token transfer, or alternatively by directly calling ERC20ConvictionScore.updateConvictionScore(). The availableTribute() and availableGovernanceTribute() functions calculate a users share by calculating their percentage of the total conviction score to find the amount owed to them.
This is shown in the following statement where userCS is the users conviction score and totalCS is the protocols total conviction score:
The tribute amount that can be successfully claimed disproportionally favours users who have updated their conviction score more recently and who are early to claim their allocated tribute.
Consider the following POC:
As you can see from the above example, the amount of tokens transferred favours users who claim early and update their conviction score. It is entirely possible that due to the finite amount of tokens stored in the contract, a number of users wont be able to successfully claim their allocated tribute.
Manual code review.
There is no easy solution to the mentioned issue. Ideally, all users should have an up to date conviction score whenever claimTribute() or claimGovernanceTribute() are called, although this would be an incredibly gas intensive mitigation. Alternatively, the protocols total conviction score can be calculated by tracking the total minted balance of FSD.sols token and multiplying this by a running total of time elapsed. This will need to be adjusted whenever tokens are minted or burned and updated during tribute claims.
YunChe404 (FairSide) disputed and disagreed with severity
