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

1 stars 0 forks source link

Naming convention for internal functions not used consistently #17

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.

Most internal function names start with an underscore (_) However quite a lot of internal function names don't follow this convention.

Proof of concept

One example is: updateHourlyBondAmount in HourlyBondSubscriptionLending.sol Also all the functions in RoleAware.sol don't comply to the standard.

Impact

The code is more difficult to read if a naming convention is not used consistently.

Recommended mitigation steps

Add an underscore (_) prefix to all internal functions.

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.