code-423n4 / 2021-12-vader-findings

0 stars 0 forks source link

Public function that should be declared external (2) #141

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Dravee

Vulnerability details

Impact

Public functions that are never called by the contract should be declared external to save gas.

Proof of Concept

This function is never called by the contract : https://github.com/code-423n4/2021-12-vader/blob/main/contracts/dex-v2/pool/VaderPoolV2.sol#L63-L103

Tools Used

VS Code

Recommended Mitigation Steps

Change function visibility from public to external

jack-the-pug commented 2 years ago

Dup #175