pancakeswap / pancake-swap-interface-v1

:pancakes: Pancake trading interface V1
https://exchange.pancakeswap.finance
GNU General Public License v3.0
316 stars 944 forks source link

Swapping through low-liquidity pairs #95

Open aterehov opened 3 years ago

aterehov commented 3 years ago

Bug Description Website offers to swap some tokens through low-liquidity pairs while there are high-liquidity pairs for the same tokens. Examples: For BNB to CAKE website offers to use BNB > BUSD > CAKE, while the better route is BNB > CAKE (directly), because there is an $11M pair for that. USDT to NYA swap: website offers USDT > WBNB > NYA, while the better route is USDT > WBNB > CAKE > NYA (more liquidity there)

Steps to Reproduce

  1. Go to exchange.pancakeswap.finance
  2. Set a swapping route: from USDT to NYA (it shows out the bug more clearly and appears more often)
  3. Enter "20" in the top field (USDT)
  4. You will see the wrong route USDT > WBNB > NYA ...

Expected Behavior A correct route for USDT > NYA example is USDT > WBNB > CAKE > NYA (or any other through CAKE). The same is for other routes: it should rather choose high-liquidity pairs.

Additional Context Some screenshots showing examples above with wrong routes Снимок экрана от 2020-12-21 02-46-35 Снимок экрана от 2020-12-21 02-11-17

geckah commented 3 years ago

Having the same issue with eth - compound. It goes through bnb resulting in high price impact

RabbitDoge commented 3 years ago

The eth/comp bug is fixed. I'll check for the cake pair.

masha256 commented 3 years ago

I'm seeing the same for BUSD to ETH. It wants to route BUSD -> WBNB -> ETH when there is a BUSD/ETH LP with $1.9M USD worth of liquidity in it. This results in paying twice the fee on a swap since it routes through two pools instead of one.