Open code423n4 opened 3 years ago
shw
In general, if not called by the contract itself, public functions can be declared as external to save gas.
external
Referenced code: MStableYieldSource.sol#L61 MStableYieldSource.sol#L69 SwappableYieldSource.sol#L67 SwappableYieldSource.sol#L98 SwappableYieldSource.sol#L219
Change public to external in the referenced functions.
public
SwappableYieldSource PR: https://github.com/pooltogether/swappable-yield-source/pull/12
Handle
shw
Vulnerability details
Impact
In general, if not called by the contract itself, public functions can be declared as
external
to save gas.Proof of Concept
Referenced code: MStableYieldSource.sol#L61 MStableYieldSource.sol#L69 SwappableYieldSource.sol#L67 SwappableYieldSource.sol#L98 SwappableYieldSource.sol#L219
Recommended Mitigation Steps
Change
public
toexternal
in the referenced functions.