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

feat(market-price): use spot price for LIMIT market price button #5301

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

alfetopito
Copy link
Collaborator

Summary

Depends on #5297

Using spot price (from BFF USD estimations) to populate the market price button in the limit orders form.

It's easier to see in the new design, but since it's independent from the changes there I'm piping into develop to add there later.

⚠️ Notes

  • Before this change, we were adding a 0.1% slippage to the current market price to make it more likely to match
    This is being removed to match exactly what's shown in the table
  • The previous value was size dependent, based on the result from the quote. Now this is purely the spot price
  • As a bonus, the market price loading is back! (Don't know since when, but it was not being set at all)

To Test

  1. Open LIMIT
  2. Pick pair of tokens
  3. Place order (out of market just to have it pending)
  4. For the same pair, check the proposed market price in the form
  • Should match exactly what's shown in the table

@alfetopito alfetopito self-assigned this Jan 15, 2025
Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cowfi ✅ Ready (Inspect) Visit Preview Jan 16, 2025 3:16pm
explorer-dev ✅ Ready (Inspect) Visit Preview Jan 16, 2025 3:16pm
swap-dev ✅ Ready (Inspect) Visit Preview Jan 16, 2025 3:16pm
3 Skipped Deployments
Name Status Preview Updated (UTC)
cosmos ⬜️ Ignored (Inspect) Visit Preview Jan 16, 2025 3:16pm
sdk-tools ⬜️ Ignored (Inspect) Visit Preview Jan 16, 2025 3:16pm
widget-configurator ⬜️ Ignored (Inspect) Visit Preview Jan 16, 2025 3:16pm

@alfetopito
Copy link
Collaborator Author

Build failed 😠
Working on it...

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @alfetopito , great, thank you!
But there is something definitely wrong with prices when I pick tokens with different decimals in the fields. See:
Arbitrum:
image
image

Base:
image

Gnosis chain:
gnosis
gnosis1
Ethereum:
image

Base automatically changed from feat/spot-price-refactor-v2 to develop January 16, 2025 15:07
@alfetopito
Copy link
Collaborator Author

Please post merge review

@alfetopito alfetopito merged commit f2b1881 into develop Jan 16, 2025
13 checks passed
@alfetopito alfetopito deleted the feat/market-price branch January 16, 2025 15:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants