Closed code423n4 closed 2 years ago
WatchPug
Unused named returns increase contract size and gas usage at deployment.
https://github.com/code-423n4/2021-11-unlock/blob/ec41eada1dd116bcccc5603ce342257584bec783/smart-contracts/contracts/Unlock.sol#L257-L260
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/AssetWrappers/WJLP/WJLP.sol#L246-L246
function _userUpdate(address _user, uint256 _amount, bool _isDeposit) private returns (uint pendingJoeSent) {
pendingJoeSent is unused.
pendingJoeSent
@LilYeti : Duplicate #288
It can't be a duplicate of itself
Duplicate of #24
Handle
WatchPug
Vulnerability details
Unused named returns increase contract size and gas usage at deployment.
https://github.com/code-423n4/2021-11-unlock/blob/ec41eada1dd116bcccc5603ce342257584bec783/smart-contracts/contracts/Unlock.sol#L257-L260
https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/AssetWrappers/WJLP/WJLP.sol#L246-L246
pendingJoeSent
is unused.