Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display an additional warning if price impact is greater than 10% and user attempts to trade anyway #4858

Closed
willyogo opened this issue Jun 28, 2023 · 0 comments · Fixed by #5032
Assignees

Comments

@willyogo
Copy link
Contributor

Overview

If a user clicks 'Confirm and Trade Anyway' on a trade where the expected price impact is 10% or greater (or the expected loss in fiat value is 10% or greater), a native warning is displayed and the user must click to confirm again before their wallet is prompted.

Warning copy:
Due to the size of this trade relative to available liquidity, the expected price impact of this trade is X%. Are you sure you want to trade?

CTAs: Cancel, Trade Anyway

image

References and additional details

Beard recommends using window.confirm to trigger the native warning for this (on ios, android, and web)

Acceptance Criteria

AC:

  1. If a user clicks 'Confirm and Trade Anyway' on a trade where the expected price impact is 10% or greater (or the expected loss in fiat value is 10% or greater), a native warning is displayed and the user must click 'Trade Anyway' again before their wallet is prompted to confirm the transaction

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

@willyogo willyogo changed the title Display an additional warning if slippage is greater than 10% and user attempts to trade anyway Display an additional warning if price impact is greater than 10% and user attempts to trade anyway Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants