This is not covered by tests, so no gas benchmarks.
https://github.com/code-423n4/2023-11-canto/blob/335930cd53cf9a137504a57f1215be52c6d67cb3/1155tech-contracts/src/Market.sol#L263-L270
To get the amount we call an internal function _getRewardsSinceLastClaim() which has the following implementation:
The internal function reads shareData[_id].shareHolderRewardsPerTokenScaled, which is a state variable which is also being read in the main function. We can avoid making this state read twice by inlining the internal function and caching one call:
OpenCoreCH (Canto) confirmed
0xTheC0der (judge) commented:
For this audit, 17 analysis reports were submitted by wardens. An analysis report examines the codebase as a whole, providing observations and advice on such topics as architecture, mechanism, or approach. The report highlighted below by 0xSmartContract received the top score from the judge.
The following wardens also submitted reports: MrPotatoMagic, Bauchibred, clara, aariiif, hunter_w3b, Sathish9098, 0xepley, Kose, unique, K42, emerald7017, cats, fouzantanveer, 0xbrett8571, invitedtea, and Myd.
