
Uniswap V4 · Reads onchain state
Reads the spot price of one token in the other on a Uniswap V4 pool. The pool's stored square-root price is read through the StateView and converted to the price of one whole base token in raw quote units. It is the marginal price before fees, not an executable amount. The pools of one pair disagree, so the fee tier is named in the list, and the deepest pool is offered first. Reach for it to compare against an oracle price and detect a stale or manipulated pool, or to set a rough floor before a swap quote refines it.
On other protocols · 11