prisma-fi / prisma-contracts

A decentralized, non-custodial stablecoin backed by Ethereum liquid staking tokens
https://www.prismafinance.com/
MIT License
18 stars 17 forks source link

removing redundant variable newDeposit #10

Closed tanliwei closed 10 months ago

tanliwei commented 10 months ago

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.