Constants are not explicitly declared #115
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
WatchPug
Vulnerability details
It's a best practice to use constant variables rather than literal values to make the code easier to understand and maintain.
Consider defining a constant variable for the literal value used and giving it a clear and self-explanatory name.
Instances include:
https://github.com/XDeFi-tech/xdefi-distribution/blob/3856a42df295183b40c6eee89307308f196612fe/contracts/XDEFIDistribution.sol#L82-L82
Consider changing
uint256(18250 days)
toMAX_DURATION
constant.The text was updated successfully, but these errors were encountered: