Besides the conviction scores of users, there appears to be tracking of the FairSide protocols tokenized conviction score as a whole (using fscAddress = address(fairSideConviction)). This is evident in the attempted reduction of the protocols score when a user acquires conviction back from an NFT. However, the complementary accrual of the users conviction score to fscAddress when the user tokenizes their conviction score to mint an NFT is missing in tokenizeConviction().
Because of this missing update of the conviction score to fscAddress upon tokenization, there are no checkpoints written for fscAddress. There also doesnt appear to be any initialization for bootstrapping this addresss conviction score checkpoints. As a result, the sub224() on Line350 of ERC20ConvictionScore.sol will always fail with an underflow. This is because fscOld = 0 (because fscNum = 0) and convictionScore > 0, effectively reverting all calls to acquireConviction().
The impact of this is that all tokenized NFTs can never be redeemed back to their conviction scores leading to a lock/loss of FSD funds for users who tokenized/sold/bought FairSide NFTs.
Proof of Concept:
Recommend adding appropriate logic to bootstrap, initialize fscAddress s tokenized conviction score checkpoints, and update it during tokenization.
fairside-core (FairSide) confirmed:
fairside-core (FairSide) commented:
cemozerr (Judge) commented:
