https://github.com/code-423n4/2023-11-canto/blob/335930cd53cf9a137504a57f1215be52c6d67cb3/1155tech-contracts/src/Market.sol#L203-L221
To get the rewardsSinceLastClaim we call an internal function _getRewardsSinceLastClaim() which has the following implementation:
The internal function reads shareData[_id].shareHolderRewardsPerTokenScaled and tokensByAddress[_id][msg.sender]) which are state variables which are also being read in the main function. We can avoid making this state reads twice by inlining the internal function and caching one call:
