Closed sherlock-admin2 closed 11 months ago
4 comment(s) were left on this issue during the judging contest.
panprog commented:
invalid because lack of documentation is not a valid issue by sherlock rules
n33k commented:
invalid, ai generated groundless report
darkart commented:
The same as 14
polarzero commented:
Invalid. This is true, as the lack of documentation and comments make it very difficult to understand the code. However, this does not qualify as a medium/high severity issue.
0xVinylDavyl
medium
The code essential Risk Parameter lacks proper documentation in the form of inline comments and explanations
Summary
The code essential Risk Parameter lacks proper documentation in the form of inline comments and explanations, making it difficult for developers and auditors to understand the code's functionality and purpose.
Vulnerability Detail
The code provided is missing essential inline comments and explanations that would help readers, including developers and auditors, understand the code's logic and purpose. Clear and comprehensive documentation is crucial for maintaining code quality, ensuring transparency, and facilitating the auditing process.
Impact
The absence of proper documentation can have several adverse effects:
Code Snippet
example of code without proper documentation, particularly lacking inline comments:
https://github.com/sherlock-audit/2023-09-perennial/blob/main/perennial-v2/packages/perennial/contracts/types/RiskParameter.sol#L142
Tool used
Manual Review
Recommendation
To improve code readability and facilitate understanding, it is recommended to add detailed inline comments and explanations to clarify the purpose and functionality of each part of the code. Here is an example of how the code can be documented:
By adding such inline comments and explanations, the code becomes more understandable, reducing the risk of misunderstandings and errors during development and auditing.