40,000 USDC
View results
Submission Details
Severity: gas
Valid

Constants should be defined rather than using magic numbers

Summary

The term "magic number" refers to the anti-pattern of using numbers directly in source code. This has been referred to as breaking one of the oldest rules of programming.

Vulnerability Details

There is 1 instance of this issue.

File: src/EscrowFactory.sol
/// @audit 0xff
72: bytes1(0xff),
File Link Instance Count Instance Link
EscrowFactory.sol 1 72

Impact

The use of unnamed magic numbers in code obscures the developer's intent in choosing that number, increases opportunities for subtle errors, and makes it more difficult for the program to be adapted and extended in the future.

Tools Used

baudit: a custom static code analysis tool; manual review

Recommendations

Replace all significant magic numbers with named constants to make the contracts easier to read, understand, and maintain.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.