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

Underscore function arguments

Summary

Lack consistency function arguments structure e.g underscores _

Vulnerability Details

Staking.sol all other functions use _ e.g function withdraw(uint _amount) external for function arguments but line 80 does not

Lender.sol all other functions from line 84 to line 100 use underscore but rest of function from line 108 where there is function getPoolId(
address lender,
address loanToken,
address collateralToken
) do not make use of this format

Fees.sol all functions make use of underscore for function arguments

Beedle.sol all functions do not make use of underscore

The above shows inconsistencies within same contract and across the contracts

Impact

Informational: This leads to inconsistency in code affecting code quality, code readability and maintanability

Tools Used

Manual Analysis

Recommendations

It is recommended to be consistent and prefer _ to all function arguments across all relevant functions of all relevant contracts in project. If underscore not desired then ensure contracts follow same style and do not use them. If used for specific functions e.g all getter functions may be ideal to explain or detail this

Support

FAQs

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