Open code423n4 opened 2 years ago
0x0x0x
!= 0 is a cheaper operation compared to > 0, when dealing with uint.
!= 0
> 0
uint
./Basket.sol:68: require(_tokens.length > 0); ./Basket.sol:77: require(_weights[i] > 0); ./Basket.sol:93: require(amount > 0); ./Basket.sol:110: require(amount > 0); ./Basket.sol:292: require(tokenAmount > 0); ./Factory.sol:53: require(newBondPercentDiv > 0);
Handle
0x0x0x
Vulnerability details
Impact
!= 0
is a cheaper operation compared to> 0
, when dealing withuint
.Occurrences