Open code423n4 opened 2 years ago
0x0x0x
!= 0 is a cheaper operation compared to > 0, when dealing with uint.
!= 0
> 0
uint
contracts/Slingshot.sol:74: require(finalAmountMin > 0, "Slingshot: finalAmountMin cannot be zero"); contracts/Slingshot.sol:75: require(trades.length > 0, "Slingshot: trades cannot be empty"); contracts/module/IUniswapModule.sol:28: require(path.length > 0, "UniswapModule: path length must be >0");
grep
Handle
0x0x0x
Vulnerability details
Impact
!= 0
is a cheaper operation compared to> 0
, when dealing withuint
.Occurences
Tools Used
grep