Slither

Slither

Community Analyzer
Out-of-order retryable transactions SLITHER-W1093
Anti-pattern
Major

Out-of-order retryable transactions

If a return is incorrectly used in assembly mode SLITHER-W1023
Anti-pattern
Critical

Detect if return in an assembly block halts unexpectedly the execution.

Local variables used prior their declaration SLITHER-W1056
Anti-pattern
Minor

Detects the possible usage of a variable before the declaration is stepped over (either because it is later declared, or declared in another scope).

Conformity to Solidity naming conventions SLITHER-W1077
Anti-pattern
Minor

Solidity defines a naming convention that should be followed.

Rule exceptions

  • Allow constant variable name/symbol/decimals to be lowercase (ERC20).
  • Allow _ at the beginning of the mixed_case match for private variables and unused parameters.
Unused state variables SLITHER-W1082
Anti-pattern
Minor

Unused state variable.

If a return is used instead of a leave SLITHER-W1026
Anti-pattern
Critical

Detect if a return is used where a leave should be used.

Dangerous usage of block.timestamp SLITHER-W1066
Anti-pattern
Minor

Dangerous usage of block.timestamp. block.timestamp can be manipulated by miners.

Assembly usage SLITHER-W1067
Anti-pattern
Minor

The use of assembly is error-prone and should be avoided.

transferFrom uses arbitrary from SLITHER-W1002
Anti-pattern
Critical

Detect when msg.sender is not used as from in transferFrom.

Incorrect exponentiation SLITHER-W1022
Anti-pattern
Critical

Detect use of bitwise xor ^ instead of exponential **

Incorrect ERC721 interfaces SLITHER-W1033
Anti-pattern
Major

Incorrect return values for ERC721 functions. A contract compiled with solidity > 0.4.22 interacting with these functions will fail to execute them, as the return value is missing.

Missing inheritance SLITHER-W1076
Anti-pattern
Minor

Detect missing inheritance.

Modifying storage array by value SLITHER-W1003
Anti-pattern
Critical

Detect arrays passed to a function that expects reference to a storage array

ABI encodePacked Collision SLITHER-W1004
Anti-pattern
Critical

Detect collision due to dynamic type usages in abi.encodePacked

The order of parameters in a shift instruction is incorrect SLITHER-W1005
Anti-pattern
Critical

Detect if the values in a shift operation are reversed

Multiple constructor schemes SLITHER-W1006
Anti-pattern
Critical

Detect multiple constructor definitions in the same contract (using new and old schemes).

Contract's name reused SLITHER-W1007
Anti-pattern
Critical

If a codebase has two contracts the similar names, the compilation artifacts will not contain one of the contracts with the duplicate name.

Detected unprotected variables SLITHER-W1008
Anti-pattern
Critical

Detect unprotected variable that are marked protected