In the _claimReward function, a new variable newDeposit is declared with the value of compoundedDeposit.
Note that both newDeposit and compoundedDeposit are memory variables, and the newDeposit is always the same as the compoundedDeposit.
Thus, there is no need to declare a new variable newDeposit.
Recommend removing the redundant variable newDeposit to save gas.
In the
_claimReward
function, a new variablenewDeposit
is declared with the value ofcompoundedDeposit
. Note that bothnewDeposit
andcompoundedDeposit
are memory variables, and thenewDeposit
is always the same as thecompoundedDeposit
. Thus, there is no need to declare a new variablenewDeposit
.Recommend removing the redundant variable
newDeposit
to save gas.