Stream#claimReward()
storage writes and reads of ts.rewards
can be combined into one
#259
Labels
Stream#claimReward()
storage writes and reads of ts.rewards
can be combined into one
#259
Handle
WatchPug
Vulnerability details
In
Stream#claimReward()
,ts.rewards
is written 2 times and read once. Combing them into one storage write can save gas.https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L555-L578
Recommendation
Change to:
The text was updated successfully, but these errors were encountered: