Get pool state
Get pool state

Uniswap V3 · Reads onchain state

Reads the current state of a Uniswap V3 pool: its price, the tick it sits in, the state of its price oracle, and the protocol fee in force. The pool's slot0 is one storage word read in one call, so the square-root price, the current tick, the oracle ring's index and cardinality, the protocol fee switch, and the pool's unlocked flag all come back together. Reach for it to check whether a position is in range before collecting or rebalancing, or to anchor a new range on the live tick. Ticks are signed: a comparison against a negative tick needs both sides on the same side of zero.

On other protocols · 1