Uniswap / v3-periphery

🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v3
https://uniswap.org
GNU General Public License v2.0
1.17k stars 1.09k forks source link

IUniswapV3PoolState.ticks(uint24 tick) always returns zero - why? #260

Open chinyasuhail opened 2 years ago

chinyasuhail commented 2 years ago

IUniswapV3PoolState.ticks(tick) returns zero - why?

https://docs.uniswap.org/protocol/reference/core/interfaces/pool/IUniswapV3PoolState

hensha256 commented 2 years ago

Hi! We're going to need more information to answer this question I'm afraid - what pool are you trying to look at? This function does not always return 0

byhashdong commented 1 year ago

WETH/USDC(0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640)always return 0, below is the snapshot

image

SafeSwap1 commented 1 year ago

WETH/USDC(0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640)always return 0, below is the snapshot

image

it's returning 0's and false because it's not rounded to the value of the tickSpacing. the tick index supplied to the functions.ticks must be in the multiples of the tickSpacing value