code-423n4 / 2021-11-streaming-findings

0 stars 0 forks source link

Code Style: public functions not used by current contract should be external #260

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

WatchPug

Vulnerability details

Here are some examples that the code style does not follow the best practices:

https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L417-L417

function stake(uint112 amount) public lock updateStream(msg.sender) {

https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L646-L646

function recoverTokens(address token, address recipient) public lock {

https://github.com/code-423n4/2021-11-streaming/blob/56d81204a00fc949d29ddd277169690318b36821/Streaming/src/Locke.sol#L487-L487

function exit() public updateStream(msg.sender) {
0xean commented 2 years ago

Also a gas optimization, marking as such