web icon indicating copy to clipboard operation
web copied to clipboard

Fee display handling in trade modal + displaying slippage amounts in fiat

Open BF2025DEV opened this issue 3 years ago • 1 comments

Overview

Gm - Was going to combine this ticket with #2266 but it got too long so separated them.

This one is all about fee display handling in the trade modal and displaying slippage amounts. This came to the forefront due to how Cowswap calculates how much the user will receive, based on #2245 and as shown below where we give the impression the user is not losing any value due to slippage. 181280207-c61a3890-cb2f-44a7-9b7d-bb5f7a468562

And with Cowswap, the user is shown that they will receive the same amount of $ in their desired asset, but Cowswap removes fees from the 'sell' asset. In screenshot below, user is shown they'll receive $10 DAI. However, after processing the transaction, they receive ~5 DAI because of fees + slippage.

Whattheusersees1

The desired handling of this is outlined and shown below. Here is the Figma link for additional reference. Ty @reallybeard

User can enter amount to trade or receive, as normal. Slippage amounts in USD are shown below ($1,000 USDC showing as ~$993.27). Implementation of this closes #2245. User will see the amount they are due to receive, including fees.

Note - These numbers are taken directly from a real Cowswap trade. Screen Shot 2022-07-28 at 1 17 50 PM

Fee hover modal seen below. Screen Shot 2022-07-28 at 1 36 58 PM

Review screen below. Screen Shot 2022-07-28 at 1 38 05 PM

Pending confirmation screen below. Screen Shot 2022-07-28 at 1 38 33 PM

Final confirmation screen below. Screen Shot 2022-07-28 at 1 38 50 PM

References and additional details

Placeholder for technical implementation details.

Acceptance Criteria

  • USD values shown with slippage reflected in trade modal on all steps
  • Fee handling in trade modal is in accordance with Figma mockups to show user amounts, in fiat, lost to slippage and fees

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

BF2025DEV avatar Jul 28 '22 18:07 BF2025DEV

@reallybeard has any code been written to create the interface in those new designs, or shall I start from scratch?

0xApotheosis avatar Aug 08 '22 07:08 0xApotheosis

After checking with product this ticket is now to have the same information available to the user in the buy asset currency, rather than the fiat currency.

0xApotheosis avatar Sep 19 '22 01:09 0xApotheosis