honeyswap icon indicating copy to clipboard operation
honeyswap copied to clipboard

router prioritizes quickswap over honeyswap when swaps are equivalent

Open ceresbzns opened this issue 3 years ago • 1 comments

Describe the bug When prices returned are equal, router chooses quickswap over honeyswap even though a user would save more by using honey (b/c of lower fees on wETh pairs)

To Reproduce Steps to reproduce the behavior:

  1. Go to Honeyswap.org
  2. Enter app
  3. Choose ETH as swap pair
  4. Choose AAVE (assuming market prices are same on both dexes)
  5. Router defaulted to quickswap even tho prices were the same and I could save by switching to honeyswap

bad router bad.PNG

Expected behavior In the event that price is equivalent, router picks Honeyswap over Quickswap when user would save on fees

Screenshots Example attached

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

ceresbzns avatar Jun 25 '21 00:06 ceresbzns

I'm not entirely sure what causes this and unfortunately the example you provided is no longer valid; if you find a similar trade, can you try to type it in on the preview in my PR that reorders the exchanges (https://github.com/1Hive/honeyswap-interface/pull/53)? My guess is that when the execution price is equal it favors the last entry in the list of exchanges.

onbjerg avatar Jun 25 '21 02:06 onbjerg