You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
L72 - queuedCvxCrvRewards is set to the default value, it is not necessary to spend more gas.
L174/306/410/696/773 - Less gas is spent if in the for instead of uint i = 0; the i is not set. Also the i++ could be changed to an unchecked ++i.
L328/332 - vepochs.length** is created a variable and is only used in an if, it is not necessary.
L663/664 - locks.length is created a variable and is only used in an if, it is not necessary.
L657/665 - the variable in storage lockDuration, is used in two places, you could create a variable in memory.
L381/485/540/630 - is set to the default value, it is not necessary to spend more gas.
L496 - gas is saved if instead of setting i > 0 we set i != 0
L497/664/726 - --i saves gas, instead of i--.
L196/197/210/216/217/232/233/259/260/353/359/385/431/471/472/476/598/616/655/719/821/822/849/850/851 - Use custom errors instead of require. It could also be optimized more, if many of these validations are repeated, it could be created a private view function.
L726/702/636/422/403 - instead of variable + 1 or variable++ you could use ++variable and save 17,000 gas.
L724/722/670/665/640/524/521/484/404/402/389/335/334/332/292/281/278 - could be "--variable" instead of "variable - 1"
L829/836 - the variable in storage rdata.periodFinish is used twice, you could create a variable for that
use less gas.
L863/866 - the variable in storage rdata.periodFinish is used twice, you could create a variable for that
use less gas.
L197 - The error message has 33 characters, this generates a higher cost, it should be less than 33.
AuraBalRewardPool
L35/38/39 - it is not necessary to reset the state of the default type, more gas is spent and it is not necessary.
L90 - In the updateReward() modifier, the variable storage rewardPerTokenStored is set and then called again to set userRewardPerTokenPaid[]. You could save gas if you create a variable to hold rewardPerToken() and then set both variables with that variable.
L89 - The modifier could be a private view function or use a custom Error and wrap it with an if to fire it.
L103 - If the totalSupply() function is called twice, you could purchase a variable and use that variable.
L132 - It is not necessary to create the balance variable, you could simply pass the call inside the stake().
L139/157/178/210 - Gas is saved if instead of _variable > 0, _variable != 0 is used.
L121/139/157/206/207/210 - use custom errors instead of require.
AuraVestedEscrow
L65 - Gas is saved, if instead of endTime - startTime, endtime_ - starttime_ is used;
L33/99 - it is not necessary to set the state of the default type.
L56/57/66/78/87/97/117/118/185- use custom errors instead of require.
L100 - Less gas is spent if in the for instead of uint i = 0; the i is not set. Also the i++ could be changed to an unchecked ++i.
L139/140/148/149 - The vested variable is not necessary, as there is only one place where it is used.
L118 - Gas is saved if instead of totalLocked[_recipient]> 0, use totalLocked[_recipient] != 0
Booster
L29/108/114 - it is not necessary to set the state of the default type.
L129/139/149/159/182/192/202/218/219/220/222/223/226 - use custom errors instead of require.
L223 - Gas is saved if instead of IFeeDistributor(_feeDistro).getTokenTimeCursor(_feeToken) > 0, use != 0
L602 - Gas is saved if instead of platformFee > 0, != 0 is used.
L379/538 - Less gas is spent if in the for instead of uint i = 0; the i is not set. Also the i++ could be changed to an unchecked ++i.
L456/465/561/563 - for the variable storage pool.gauge, it creates a variable in memory that is only used in one place, so it is not necessary create the variable in memory.
L459/460 - for the storage pool.token variable, it creates a variable in memory that is only used in one place, so it is not necessary create the variable in memory.
L464/471 - The pool.shutdown variable is used in two places, it spends less gas if you create a variable.
L495/496 - It is not necessary to create a variable in memory, it can be passed directly inside the withdraw().
L504/505/669/670 - for the storage poolInfo[_pid].crvRewards variable, an in-memory variable is created that is only used in one place, so it is not necessary create the variable in memory.
L548/549 - for the variable storage poolInfo[_pid].stash, a variable is created in memory that is only used in one place, so it is not necessary create the variable in memory.
VoterProxy
L175 - Gas is saved if instead of balance > 0, != 0 is used.
L196 - the "return balance;" line is not necessary. is returned directly in the signature, since the name of the return variable is defined.
L225/226 - for the call balanceOfPool(_gauge).add(IERC20(_token).balanceOf(address(this))), a in-memory variable that is only used in one place, so there is no need to create the in-memory variable.
L333 - In the claimFees() function, the variable in the storage operator is used twice, therefore it would be less expensive create a variable in memory and call it twice.
CrvDepositor
L36 - it is not necessary to set the state of the default type.
L75 - Gas is saved if instead of _lockIncentive > 0, use != 0.
L113 - Gas is saved if instead of crvBalance > 0, != 0 is used.
L169 - Gas is saved if instead of _amount > 0, != 0 is used.
L210/211 - for the call to the function IERC20(crvBpt).balanceOf(msg.sender), a variable is created in memory that is only used in one place, therefore it is not necessary create the variable in memory.
CrvDepositorWrapper
L84 - Since maxAmountsIn is already initialized, it makes no sense to set the second position to 0, since that is the default value.
L139/140 - for the call to the function IERC20(BALANCER_POOL_TOKEN).balanceOf(address(this)), a variable is created in memory that is only used in one place, therefore it is not necessary create the variable in memory.
The text was updated successfully, but these errors were encountered:
AuraLocker
L72 - queuedCvxCrvRewards is set to the default value, it is not necessary to spend more gas.
L174/306/410/696/773 - Less gas is spent if in the for instead of uint i = 0; the i is not set. Also the i++ could be changed to an unchecked ++i.
L328/332 - vepochs.length** is created a variable and is only used in an if, it is not necessary.
L663/664 - locks.length is created a variable and is only used in an if, it is not necessary.
L657/665 - the variable in storage lockDuration, is used in two places, you could create a variable in memory.
L381/485/540/630 - is set to the default value, it is not necessary to spend more gas.
L496 - gas is saved if instead of setting i > 0 we set i != 0
L497/664/726 - --i saves gas, instead of i--.
L196/197/210/216/217/232/233/259/260/353/359/385/431/471/472/476/598/616/655/719/821/822/849/850/851 - Use custom errors instead of require. It could also be optimized more, if many of these validations are repeated, it could be created a private view function.
L726/702/636/422/403 - instead of variable + 1 or variable++ you could use ++variable and save 17,000 gas.
L724/722/670/665/640/524/521/484/404/402/389/335/334/332/292/281/278 - could be "--variable" instead of "variable - 1"
L829/836 - the variable in storage rdata.periodFinish is used twice, you could create a variable for that
use less gas.
L863/866 - the variable in storage rdata.periodFinish is used twice, you could create a variable for that
use less gas.
L197 - The error message has 33 characters, this generates a higher cost, it should be less than 33.
AuraBalRewardPool
L35/38/39 - it is not necessary to reset the state of the default type, more gas is spent and it is not necessary.
L90 - In the updateReward() modifier, the variable storage rewardPerTokenStored is set and then called again to set userRewardPerTokenPaid[]. You could save gas if you create a variable to hold rewardPerToken() and then set both variables with that variable.
L89 - The modifier could be a private view function or use a custom Error and wrap it with an if to fire it.
L103 - If the totalSupply() function is called twice, you could purchase a variable and use that variable.
L132 - It is not necessary to create the balance variable, you could simply pass the call inside the stake().
L139/157/178/210 - Gas is saved if instead of _variable > 0, _variable != 0 is used.
L121/139/157/206/207/210 - use custom errors instead of require.
AuraVestedEscrow
L65 - Gas is saved, if instead of endTime - startTime, endtime_ - starttime_ is used;
L33/99 - it is not necessary to set the state of the default type.
L56/57/66/78/87/97/117/118/185- use custom errors instead of require.
L100 - Less gas is spent if in the for instead of uint i = 0; the i is not set. Also the i++ could be changed to an unchecked ++i.
L139/140/148/149 - The vested variable is not necessary, as there is only one place where it is used.
L118 - Gas is saved if instead of totalLocked[_recipient]> 0, use totalLocked[_recipient] != 0
Booster
L29/108/114 - it is not necessary to set the state of the default type.
L129/139/149/159/182/192/202/218/219/220/222/223/226 - use custom errors instead of require.
L223 - Gas is saved if instead of IFeeDistributor(_feeDistro).getTokenTimeCursor(_feeToken) > 0, use != 0
L602 - Gas is saved if instead of platformFee > 0, != 0 is used.
L379/538 - Less gas is spent if in the for instead of uint i = 0; the i is not set. Also the i++ could be changed to an unchecked ++i.
L456/465/561/563 - for the variable storage pool.gauge, it creates a variable in memory that is only used in one place, so it is not necessary create the variable in memory.
L459/460 - for the storage pool.token variable, it creates a variable in memory that is only used in one place, so it is not necessary create the variable in memory.
L464/471 - The pool.shutdown variable is used in two places, it spends less gas if you create a variable.
L495/496 - It is not necessary to create a variable in memory, it can be passed directly inside the withdraw().
L504/505/669/670 - for the storage poolInfo[_pid].crvRewards variable, an in-memory variable is created that is only used in one place, so it is not necessary create the variable in memory.
L548/549 - for the variable storage poolInfo[_pid].stash, a variable is created in memory that is only used in one place, so it is not necessary create the variable in memory.
VoterProxy
L175 - Gas is saved if instead of balance > 0, != 0 is used.
L196 - the "return balance;" line is not necessary. is returned directly in the signature, since the name of the return variable is defined.
L225/226 - for the call balanceOfPool(_gauge).add(IERC20(_token).balanceOf(address(this))), a in-memory variable that is only used in one place, so there is no need to create the in-memory variable.
L333 - In the claimFees() function, the variable in the storage operator is used twice, therefore it would be less expensive create a variable in memory and call it twice.
CrvDepositor
L36 - it is not necessary to set the state of the default type.
L75 - Gas is saved if instead of _lockIncentive > 0, use != 0.
L113 - Gas is saved if instead of crvBalance > 0, != 0 is used.
L169 - Gas is saved if instead of _amount > 0, != 0 is used.
L210/211 - for the call to the function IERC20(crvBpt).balanceOf(msg.sender), a variable is created in memory that is only used in one place, therefore it is not necessary create the variable in memory.
CrvDepositorWrapper
L84 - Since maxAmountsIn is already initialized, it makes no sense to set the second position to 0, since that is the default value.
L139/140 - for the call to the function IERC20(BALANCER_POOL_TOKEN).balanceOf(address(this)), a variable is created in memory that is only used in one place, therefore it is not necessary create the variable in memory.
The text was updated successfully, but these errors were encountered: