Closed code423n4 closed 3 years ago
a_delamo
In all the contracts we find most of the methods defined as public instead of external. Most of these methods are not being called from inside the contract, so could be defined as external and save some gas cost when being called.
https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external
https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices?answertab=active#tab-top
Slither
Just use external when possible in order to reduce the gas cost
Probably addressed in mega external patch, https://github.com/vetherasset/vaderprotocol-contracts/commit/d946b6262ac83cdb7722baa3a8684c4ceabf4ea3
external
duplicate of #14
Handle
a_delamo
Vulnerability details
Impact
In all the contracts we find most of the methods defined as public instead of external. Most of these methods are not being called from inside the contract, so could be defined as external and save some gas cost when being called.
Proof of Concept
https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external
https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices?answertab=active#tab-top
Tools Used
Slither
Recommended Mitigation Steps
Just use external when possible in order to reduce the gas cost