-
Notifications
You must be signed in to change notification settings - Fork 30
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
liquidity for univ3prices.getAmountsForLiquidityRange #7
Comments
hi @sydneyhenrard,
Why would you try to do that? The calculations are off because of the "out of range" ticks that you used... You'd have to calculate the What exactly is the use case? |
Let's say I want to use that method for next tick on the left. I get the liquidityNet from the tick and add it the
For the first parameter I think I can use the Would it be correct? |
I need to run a few tests to make sure this works, but I am assuming you'd need to use the getAmountsForLiquidityRange () function with the tick range starting from the very start end to the very end - so capturing the entire price-range. |
I wonder if the |
Could you also give an example how to use getAmountsForLiquidityRange() function to calculate total reserves? Thanks in advance! |
I tried to use univ3prices.getAmountsForLiquidityRange to get the number of token in ticks that are out of range
The amount of token 0 is pretty high but I guess it's because I used the liquidity of the pool. Where does this value should come from.
The text was updated successfully, but these errors were encountered: