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

Wrong comment in removeLiquidity #258

Open
code423n4 opened this issue Dec 1, 2021 · 2 comments
Open

Wrong comment in removeLiquidity #258

code423n4 opened this issue Dec 1, 2021 · 2 comments
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

Handle

cmichel

Vulnerability details

There's a misleading comment in UniswapHandler.removeLiquidity:

(amountMalt, amountReward) = router.removeLiquidity(
  address(malt),
  address(rewardToken),
  liquidityBalance,
  0,
  0,
  // @audit wrong comment
  msg.sender, // transfer broken LP tokens to sender
  now
);

A remove liquidity call on the router never "transfers broken LP tokens".
All LP tokens are always burned.
This msg.sender parameter is the recipient of the redeemed underlying pool pair tokens, malt and rewardToken.

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 1, 2021
code423n4 added a commit that referenced this issue Dec 1, 2021
@0xScotch
Copy link
Collaborator

0xScotch commented Dec 4, 2021

I can see the wording here is confusing but the meaning is that the "LP tokens are broken into their constituent tokens (ie Malt and DAI) and transfered to the sender". The meaning isn't incorrect imo

@0xScotch 0xScotch added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label Dec 4, 2021
@GalloDaSballo
Copy link
Collaborator

I think in this case non-critical works well.

@GalloDaSballo GalloDaSballo added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments labels Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

3 participants