Uniswap / interface

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

Add inline gas estimates #1506

Open callil opened 3 years ago

callil commented 3 years ago

New users are not aware of gas fees and don't read their wallet transaction prompts. We should show the estimated gas fees inline so users can get a better idea of the total cost of the transaction.

There are two cases:

  1. For a regular swap, the estimated gas costs should be displayed in the confirm screen and clearly show it is an additional Ethereum fee.

  2. For swaps with approves (not permits) - we should show the estimated total transaction cost (approve + swap fee) under the buttons. This may help reduce sticker shock of the two transactions.

Screen Shot 2021-05-11 at 1 04 32 PM Screen Shot 2021-05-11 at 1 05 32 PM

Additional considerations:

jab416171 commented 3 years ago

A warning should also be added if the gas of the approve+swap is higher than the user's eth balance