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

0 stars 0 forks source link

Redundant code #250

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

WatchPug

Vulnerability details

Redundant code increase contract size and gas usage at deployment.

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

if (!isSale) {
    // not a straight sale, so give the user some receipt tokens
    _mint(msg.sender, trueDepositAmt);
} else {
}

L443-444, else {} is redundant.

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

if (!isSale) {
    _burn(msg.sender, amount);
} else {
}

L472-473, else {} is redundant.