Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Incorrect Calculation for Trade.minimumAmountOut #43

Open
Jdecristi opened this issue May 13, 2023 · 0 comments
Open

Incorrect Calculation for Trade.minimumAmountOut #43

Jdecristi opened this issue May 13, 2023 · 0 comments

Comments

@Jdecristi
Copy link

The math for the Trade.minimumAmountOut() is wrong. This is an issue in the interface because the Minimum output in the SwapDetailsDropdown is showing the wrong number.

Steps to Reproduce

  1. Go to app.uniswap.org
  2. Add two tokens to swap (Easier to test with two stablecoins like USDC & DAI)
  3. Add Custom Slippage (Easier to test with a round number like 50%)
  4. Open SwapDetailsDropdown see the incorrect number in the "Minimum output" row

Expected Behavior

Trade.minimumAmountOut() method should correctly calculate the slippage

Additional Context

In the screenshot the Minimum output is 666.604 when it should be 499.953.

Screenshot 2023-05-13 at 12 27 06 AM

@Jdecristi Jdecristi changed the title Incorrect Math for Trade.minimumAmountOut Incorrect Calculation for Trade.minimumAmountOut May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant