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 liquidityAdded check #6

Open
code423n4 opened this issue Sep 14, 2021 · 0 comments
Open

Redundant liquidityAdded check #6

code423n4 opened this issue Sep 14, 2021 · 0 comments

Comments

@code423n4
Copy link
Contributor

Handle

itsmeSTYJ

Vulnerability details

Impact

Gas optimization

Proof of Concept

The require statement on line 201 in the PostAuctionLauncher.sol contract is redundant because:

  1. launcherInfo.liquidityAdded is only updated in the finalize() function
  2. You cannot call finalize() unless there are tokens deposited on both side
  3. If you cannot call finalize(), line 201 will never be called because line 200 will always fail first.
  4. If you manage to successfully pass line 200, it means that finalize() has been called and there will definitely be liquidity so this check is not needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants