Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant code #110

Closed
code423n4 opened this issue Dec 15, 2021 · 1 comment
Closed

Redundant code #110

code423n4 opened this issue Dec 15, 2021 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists G (Gas Optimization)

Comments

@code423n4
Copy link
Contributor

Handle

WatchPug

Vulnerability details

Redundant code increase contract size and gas usage at deployment.

https://github.com/code-423n4/2021-12-sublime/blob/9df1b7c4247f8631647c7627a8da9bdc16db8b11/contracts/CreditLine/CreditLine.sol#L897-L898

uint256 _tokenInStrategy = _liquidityShares;
_tokenInStrategy = IYield(_strategyList[index]).getTokensForShares(_liquidityShares, _collateralAsset);

L897, _tokenInStrategy = _liquidityShares is redundant.

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Dec 15, 2021
code423n4 added a commit that referenced this issue Dec 15, 2021
@ritik99 ritik99 added the duplicate This issue or pull request already exists label Jan 7, 2022
@ritik99
Copy link
Collaborator

ritik99 commented Jan 7, 2022

This is a duplicate of #36 since both deal with unnecessary initializations. The location of the issue mentioned in the two places is however different

@ritik99 ritik99 closed this as completed Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists G (Gas Optimization)
Projects
None yet
Development

No branches or pull requests

2 participants