Iterating liquidity from the current tick #9
-
Hello, I'd greatly appreciate your help on It iterates currently from zero (line 108) and the comment in the line 107 states that it should start from the total liquidity if iterating from the current tick. However, I am not sure how to change the code in order to do that. Another question is whether the script takes into the account the problem with the unclaimed fees https://medium.com/coinmonks/all-your-uniswap-v3-liquidity-farming-calculations-are-dead-wrong-heres-why-20bd47f55d69? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi, The active liquidity in the pool is read simply by accesing About the problem mentioned in the article - the TVL problem shows up in the aggregate token values maintained by the subgraph. My scripts does not use those values, they use liquidity values, calculate token amounts from that, and sum over multiple ticks or positions. They should not be affected by the problem. |
Beta Was this translation helpful? Give feedback.
Hi,
The active liquidity in the pool is read simply by accesing
pool["liquidity"]
.About the problem mentioned in the article - the TVL problem shows up in the aggregate token values maintained by the subgraph. My scripts does not use those values, they use liquidity values, calculate token amounts from that, and sum over multiple ticks or positions. They should not be affected by the problem.