Extremely unbalanced V3 pools get into a bad state in the UI
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
Extremely unbalanced V3 pools get into a bad state in the UI which makes it impossible to add liquidity in full range or in the token which is in deficit.
E.g. fUSDC price is 0.000000000000000000000000000000000000002939 per USDC in this pool
I tested against the Uniswap Interface as well wtih the same pool and noticed the same result, ruling out an issue on our end, and making me think this is a bug.
It appears that in this edge case which makes it so that you're unabe to add liquidity or rebalance by adding the token which is in deficit, pool.tickCurrent got to -887272 which means pool.tickCurrent === tickLower and the input is ALWAYS disabled without any way to recover.
Expected Behavior
To be able to add the token which is in deficit, in this case USDC.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the linked add-liquidity URL with the extremely unbalanced V3 pool, then trace the UI path where pool.tickCurrent is compared with tickLower and the input becomes disabled. Check the deficit-token and full-range cases, and consider the work complete when liquidity can be added in the deficit token without the input remaining permanently disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100