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: sym & asym add LP quotes input and calcs #6027

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

0xApotheosis
Copy link
Member

Description

  • Wires up input and fiat fields for both symmetrical and asymmetrical LP quotes
  • Adds the following add liquidity "quote" calculations to the UI:
    • Slippage (in RUNE)
    • Rune per asset
    • Share of the pool

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

Contributes to #6019

Risk

Small - isolated to LP flag code paths.

Testing

Play with the "Add Liquidity" inputs and see the data populate.

Engineering

Operations

Not yet required.

Screenshots (if applicable)

Screenshot 2024-01-17 at 6 03 42 pm Screenshot 2024-01-17 at 6 07 42 pm

@0xApotheosis 0xApotheosis requested a review from a team as a code owner January 17, 2024 07:11
@gomesalexandre gomesalexandre self-requested a review January 17, 2024 08:12
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

What a simple and elegant solution to simulate the future pool/user state 🐐 looking spot-on conceptually, going to test this at runtime as a second pass.

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Tested locally and confirmed this looks sane against THORSwap:

Sym

image image
  • Matching RUNE amount looks good, but share of pool is a half of what is displayed on TS

Asset asym

image image

Looking good against TS 🎉

RUNE asym

image image

Ditto looking sane!

Apart from the half pool share when depositing symetrically, this looks sane to me 🥇.
Also noted some issues with a flash of values being calculated (possibly as network requests are going through, as this only happens once) but not an issue for now as we're not having sane loading states anywhere yet!

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

As discussed, getting this in in the name of progress 🙏🏽

@gomesalexandre gomesalexandre merged commit 04ef857 into develop Jan 17, 2024
3 checks passed
@gomesalexandre gomesalexandre deleted the lp-wiring-20240117 branch January 17, 2024 09:18
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 this pull request may close these issues.

2 participants