Submitted by auditor0517
Some rewards might be locked inside the contract due to the rounding loss.
_claimAndSyncRewards() claimed the rewards from the staking contract and tracks rewardsPerShare with the current supply.
It uses one as a multiplier and from this setting we know it has the same decimals as underlying(thus totalSupply).
My concern is _claimAndSyncRewards() is called for each deposit/transfer/withdraw in _beforeTokenTransfer() and it will make the rounding problem more serious.
So users would lose almost 50% of rewards due to the rounding loss and these rewards will be locked inside the contract.
I think there would be 2 mitigations.
Math
tbrent (Reserve) confirmed and commented:
Reserve Mitigated:
Status: Mitigation confirmed. Full details in reports from ronnyx2017, RaymondFam and bin2chen.
