suberra / funnel-contracts

Funnels are smart contracts that enforces renewable allowance as a proxy
MIT License
9 stars 0 forks source link

[Hacken 2022-11-25 Low #5] Unfinished NatSpec #40

Closed zhongfu closed 1 year ago

zhongfu commented 1 year ago

It is recommended that the code should be kept clean and properly documented with NatSpec. There are multiple functions, structs, and public storage variables that are missing proper NatSpec documentation.

There is no consistency in the multiline comment format. The /// and /* / comments are used alternately.

In IERC5827 and IERC5827Proxy interfaces multiline comment is used incorrectly with / /.

In the IERC5827Spender interface, @title is misused for description. Use @notice/@dev for explanations.

Paths

./src/Funnel.sol : Funnel, _baseToken, RenewableAllowance, rAllowance, INITIAL_CHAIN_ID, INITIAL_DOMAIN_SEPARATOR, PERMIT_RENEWABLE_TYPEHASH, PERMIT_TYPEHASH, initialize(), computeDomainSeparator(), DOMAIN_SEPARATOR(), permit(), permitRenewable(), approve(), approveRenewable(), _approve(), _remainingAllowance(), _checkOnApprovalReceived(), baseToken(), supportsInterface(), balanceOf(), totalSupply(), transfer(), fallback(), _fallback() ./src/FunnelFactory.sol : FunnelFactory, deployments, funnelImplementation, constructor(), deployFunnelForToken(), getFunnelForToken(), isFunnel() ./src/interfaces/IERC5827.sol : IERC5827 ./src/interfaces/IERC5827Payable.sol : IERC5827Payable ./src/interfaces/IERC5827Proxy.sol : IERC5827Proxy ./src/interfaces/IFunnel.sol : IFunnel, RecoveryRateExceeded() ./src/interfaces/IFunnelFactory.sol : IFunnelFactory, FunnelNotDeployed(), FunnelAlreadyDeployed(), InvalidToken(), DeployedFunnel() ./src/lib/EIP712.sol : EIP712 ./src/lib/MetaTxContext.sol : MetaTxContext, _msgSender() ./src/lib/NativeMetaTransaction.sol : NativeMetaTransaction, MetaTransactionExecuted(), executeMetaTransaction(), _verifyMetaTx() ./src/lib/Nonces.sol : Nonces, _nonces

Recommendation

NatSpec documentation best practices should be followed. For reference:

Status

New