Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.99k stars 5.05k forks source link

show warning if disable multihop is resulting in a very bad price #1357

Open moodysalem opened 3 years ago

moodysalem commented 3 years ago

If the user has disable multihop toggled, it can result in a very bad route https://github.com/Uniswap/uniswap-interface/issues/1354

We should show a warning if the price is very bad as a result of the disable multihop setting. This is a minor improvement, when the proper fix is that the user should never have to worry about the route (i.e. we fix the routing to obsolete the setting).

Enxhi369 commented 3 years ago

I apologize I've been attacket so if please let me know if anything that doesn't sounds right .

jochenboesmans commented 3 years ago

Here's the current UI for such situations:

Screenshot 2021-05-01 at 19 22 41

Is the additional warning meant to be displayed after the user presses the "swap anyway" button? Or is it more about explicitly explaining why the price impact is so high in the main swap UI?

jochenboesmans commented 3 years ago

Here's a potential solution that simply adds an explanation to the confirmation dialogues for high price impact on attempted swap in the case that multi-hops are turned off:

Screenshot 2021-05-02 at 00 15 29
moodysalem commented 3 years ago

Or is it more about explicitly explaining why the price impact is so high in the main swap UI?

This one

Here's a potential solution that simply adds an explanation to the confirmation dialogues for high price impact on attempted swap in the case that multi-hops are turned off:

Looks reasonable, although at that point user may have warning fatigue. Cal may have other ideas.