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

Some steps in Create Pair fails and a rogue pair is created which user is not able to use for SWAP #275

Open
roshan-bisht-lab49 opened this issue Oct 17, 2023 · 1 comment
Labels
P3 Low priority issue. Will not impact the release schedule if not complete.

Comments

@roshan-bisht-lab49
Copy link
Contributor

Description

Creating a new Pool in DEX is done in 2 steps

  • Step 1: Create a New Pool

Create a new Pool with selected token pair.

Get new Pair Address and LP Token address and associate newly created LPToken to user's wallet.

  • Step 2: Add Liquidity into the new pool

Set Token Allowance for the two tokens in Pair.

Add Liquidity into the new pool.

Issue

Since its a network call in few cases the second steps fails due to many reasons

  • Network Error.
  • Delay in response to get the new pair address (we are still using JSON RPC with HashIO as provider).

If this happens the Pair get created without any liquidity and this issue reflects in SWAP page where user tries to use SWAP on the newly created pair (with no liquidity) and since this pair has no liquidity we have undefined spot prices for these tokens in Pool and SWAP does not work as expected.

Issue Fix

we need to add retry method on network call if it fails to get pair address.

Current resolution in UI

As of now to quickly fix issue in Swap Page, we can go to Pools page and add liquidity again to the new created pair if it fails this makes sure the Pool has sufficient tokens balances which results in correct spot price based on individual token amount.

Steps to reproduce

  1. Go to Pools Page and tap Create Pool
  2. Select any allowed token pairs and fill the tokens amount.
  3. After tapping on Create Pool sometime it fails with rogue pair which can be seen in Pools List Page.

Additional context

No response

Hedera network

testnet

Version

v1.0

Operating system

macOS

@web3-nomad web3-nomad added the P3 Low priority issue. Will not impact the release schedule if not complete. label Apr 4, 2024
@web3-nomad
Copy link
Contributor

leaving it as in issue, but we currently have no plans to continue the DEX component of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority issue. Will not impact the release schedule if not complete.
Projects
None yet
Development

No branches or pull requests

2 participants