Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

UNI V3 Invariant failed: TICK_LOWER #153

Open
muhammadsamir11 opened this issue Nov 5, 2022 · 6 comments
Open

UNI V3 Invariant failed: TICK_LOWER #153

muhammadsamir11 opened this issue Nov 5, 2022 · 6 comments

Comments

@muhammadsamir11
Copy link

Can anyone help me to solve this issue "Invariant failed: TICK_LOWER"

@haltakov
Copy link

haltakov commented Nov 9, 2022

You tick is probably not according to the tick spacing. Try using nearestUsableTick to get a valid tick.

@SaltySousChef
Copy link

Or the pool you are trying to use is at the minimum tick and cannot get "TICK_LOWER" because there is no lower usable tick.

@muhammadsamir11
Copy link
Author

@SaltySousChef How to get the pool fee?

@muhammadsamir11
Copy link
Author

What is the best way to calculate underlying assets of univ3 pool?

@SaltySousChef
Copy link

The easiest way to get both of those values is via Uniswap's graph. If you want to do it in code you can create an instance of the pool in your language of choice and call Slot0 which will return the global state for the pool and contains the fee, current tick, liquidity and sqrtPrice which can allow you to figure out the virtual reserves. The math for this and figuring out the real reserves is in the whitepaper.

@satnam2609
Copy link

Probably you have not used the correct pool address or pool hash code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants