Open code423n4 opened 2 years ago
Dravee
private functions are cheaper than internal functions.
private
internal
Several internal functions are in contracts that are never inherited.
Their internal keywords are there:
lbt\LiquidityBasedTWAP.sol: 154: ) internal returns (uint256 currentLiquidityEvaluation) { 194: ) internal view returns (uint256) { 255: ) internal { 357: ) internal returns (uint256 currentLiquidityEvaluation) { 388: ) internal view returns (uint256) { 449: ) internal { tokens\converter\Converter.sol: 166: function getChainId() internal view returns (uint256 chainId) {
Therefore, their visibility should be reduced to private.
VS Code
Define these functions as private.
Handle
Dravee
Vulnerability details
Impact
private
functions are cheaper thaninternal
functions.Proof of Concept
Several
internal
functions are in contracts that are never inherited.Their
internal
keywords are there:Therefore, their visibility should be reduced to
private
.Tools Used
VS Code
Recommended Mitigation Steps
Define these functions as
private
.