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

Feature Request: Uniswap V3 sqrtPrice, require token decimals as input #675

Open
izzetemredemir opened this issue Sep 12, 2023 · 2 comments

Comments

@izzetemredemir
Copy link

Feature Request

I propose adding token decimal values as an input parameter to the sqrtPrice function in Uniswap V3. This would help improve the accuracy of position and liquidity calculations, particularly for pools involving USDC pairs or any other pairs with differing decimals.

Rationale

Currently, the Uniswap V3 UI sometimes displays misleading information about positions and liquidity, especially when the token pairs have different decimals. This inaccuracy can result in flawed decision-making processes for traders and liquidity providers.

Proposed Solution

Extend the sqrtPrice function to accept the decimal counts of the paired tokens as an argument. Then, adjust the underlying calculations to account for these decimals, which should make the output more accurate.

Additional Context

  • Similar issues have been discussed on GitHub and Stack Overflow.
  • This is particularly important for USDC pairs, where the discrepancy can be significant due to differing decimals.
@pushkarkumarlal
Copy link

Hi, any one working on this feature?

@Luckymhe
Copy link

Is there someone who can help me with my token. I can't sell

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

No branches or pull requests

3 participants