Open code423n4 opened 2 years ago
wfCashBase.sol
L37 - it is less expensive to validate variable != 0 than variable > 0.
L37/40- You can save gas by using a custom error with an if() instead of a require()
wfCashERC4626.sol
L23 - it is less expensive to validate variable != 0 than variable > 0.
L220 - if it were unchecked, gas would be saved, since the mathematical operation can never generate overflow or underflow.
L23/42/245- You can save gas by using a custom error with an if() instead of a require()
wfCashLogic.sol
L121/225 - it is less expensive to validate variable != 0 than variable > 0.
L305 - if it were unchecked, gas would be saved, since the mathematical operation can never generate overflow or underflow.
WrappedfCashFactory.sol
L12 - An extra gas expense is generated when setting a variable with its default value.
L57/116/129/211/225/316 - You can save gas by using a custom error with an if() instead of a require()
NotionalTradeModule.sol
L48/519 - An extra gas cost is generated when setting a variable with its default value.
L238/254/393/605/618 - Gas is saved, if instead of uint i = 0; uint i is used; Also, gas is saved if instead of i++, unchecked{++i;} is used
L395/607/619 - it is less expensive to validate variable != 0 than variable > 0.
L545/547/549 - A local variable is created that is only used once, so it could be used directly in the split.
L610/623 - Gas is saved if instead of i++, ++i is used
L169/199/227/234/269/280/378/449/485/573 - You can save gas by using a custom error with an if() instead of a require()
ModuleBase.sol
L125/126/146/147 - A local variable is created that is only used once, so it could be used directly in the division.
L154 - it is less expensive to validate variable != 0 than variable > 0.
L197/198/205/212/219/224/234/235- You can save gas by using a custom error with an if() instead of a require()
AddressArrayUtils.sol
L41/68/129/148/151 - Gas is saved, if instead of uint i = 0; uint i is used; Also, gas is saved if instead of i++, unchecked{++i;} is used
L66/223 - it is less expensive to validate variable != 0 than variable > 0.
L70/132 - Gas is saved if instead of i++, ++i is used
ExplicitERC20.sol
Invoke.sol
Position.sol
wfCashBase.sol
L37 - it is less expensive to validate variable != 0 than variable > 0.
L37/40- You can save gas by using a custom error with an if() instead of a require()
wfCashERC4626.sol
L23 - it is less expensive to validate variable != 0 than variable > 0.
L220 - if it were unchecked, gas would be saved, since the mathematical operation can never generate overflow or underflow.
L23/42/245- You can save gas by using a custom error with an if() instead of a require()
wfCashLogic.sol
L121/225 - it is less expensive to validate variable != 0 than variable > 0.
L305 - if it were unchecked, gas would be saved, since the mathematical operation can never generate overflow or underflow.
WrappedfCashFactory.sol
L12 - An extra gas expense is generated when setting a variable with its default value.
L57/116/129/211/225/316 - You can save gas by using a custom error with an if() instead of a require()
NotionalTradeModule.sol
L48/519 - An extra gas cost is generated when setting a variable with its default value.
L238/254/393/605/618 - Gas is saved, if instead of uint i = 0; uint i is used; Also, gas is saved if instead of i++, unchecked{++i;} is used
L395/607/619 - it is less expensive to validate variable != 0 than variable > 0.
L545/547/549 - A local variable is created that is only used once, so it could be used directly in the split.
L610/623 - Gas is saved if instead of i++, ++i is used
L169/199/227/234/269/280/378/449/485/573 - You can save gas by using a custom error with an if() instead of a require()
ModuleBase.sol
L125/126/146/147 - A local variable is created that is only used once, so it could be used directly in the division.
L154 - it is less expensive to validate variable != 0 than variable > 0.
L197/198/205/212/219/224/234/235- You can save gas by using a custom error with an if() instead of a require()
AddressArrayUtils.sol
L41/68/129/148/151 - Gas is saved, if instead of uint i = 0; uint i is used; Also, gas is saved if instead of i++, unchecked{++i;} is used
L66/223 - it is less expensive to validate variable != 0 than variable > 0.
L70/132 - Gas is saved if instead of i++, ++i is used
ExplicitERC20.sol
Invoke.sol
Position.sol