Uniswap / v3-core

🦄 🦄 🦄 Core smart contracts of Uniswap v3
https://uniswap.org
Other
4.28k stars 2.62k forks source link

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

Open izzetemredemir opened 10 months ago

izzetemredemir commented 10 months ago

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

pushkarkumarlal commented 10 months ago

Hi, any one working on this feature?

Luckymhe commented 7 months ago

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