code-423n4 / 2021-04-marginswap-findings

1 stars 0 forks source link

Natspec comments not used in a consistent way #15

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Email address

mail@gpersoon.com

Handle

gpersoon

Eth address

gpersoon.eth

Vulnerability details

This is a minor suggestion.

The comments do not comply perfectly to the natspec specification. Too many or too few /'s

Proof of concept

Here are a few examples: MarginRouter.sol: // @dev internal helper swapping ... MarginRouter.sol: //// @dev external function ... MarginRouter.sol: /// about a trade

There should be exactly three /'s before an @.. keyword If there is no @.. keyword then there should be two /'s

Tools used

grep " // @" grep "//// @" grep "/// [^@]" *

Recommended mitigation steps

Check and update the comments to comply with the natspec comment Note in the latest solidity version you can also use @custom:... everywhere within the source

Impact

The documentation generated using the natspec lines might not be accurate.

zscole commented 3 years ago

This submission has been judged as non-critical since this has no impact on the security or functionality of the contract.