Uniswap / Uniswap/interface

Underoptimized trade route on Optimism

Open
#2,317 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug optimism p1
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Bug Description
When looking to make a swap between SNX and USDC, I got a quote for nearly 98% price impact when it appears that there's a path for one with ~5% price impact 🤷

Steps to Reproduce

  1. Go to https://app.uniswap.org/#/swap
  2. Connect wallet and set network to Optimistic Ethereum
  3. Create a swap between 1000 SNX and USDC.
  4. At the time of writing, I'm seeing something ridiculous like $99 USDC for 1000 SNX with a route that goes from SNX -> WBTC -> USDC (see screenshot below for more details).
  5. Confirm there is a better route with SNX -> ETH -> USDC (see screenshot for exact details)

Expected Behavior
To take the route that has ~5% price impact (SNX -> ETH -> USDC) as opposed to the one that has a 98% price impact (SNX -> WBTC -> USDC)

Additional Context
What I was quoted
Screen Shot 2021-09-09 at 1 27 01 AM
Manual attempt at finding a better route
Screen Shot 2021-09-09 at 1 27 18 AM
Screen Shot 2021-09-09 at 1 27 40 AM

Thanks for taking the time to read this, and apologies in advance if this is intended and I'm misunderstanding the intended behavior 😅

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the swap in the Uniswap interface on Optimistic Ethereum using 1000 SNX to USDC, then inspect the route-selection entry point used by the swap flow. Compare the selected SNX → WBTC → USDC route with the reported SNX → ETH → USDC route; done means the interface selects the lower-price-impact route when it is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.