Skip to main content
Concentrated-liquidity pools have a valid tick range and a spacing rule for initialized ticks. Those rules apply to different values.
The reviewed upstream example needs correction before production use. The limitation below is present in the linked source; the imported code is preserved for comparison.

Source limitation

PriceWithinTicksAssertion checks a current tick against ±887,272 and requires tick % tickSpacing == 0. The spacing condition is not valid for a general Uniswap V3 current tick: a pool price can move between initialized ticks. The source also creates a fork identifier without using it for the direct pool read.

Adaptation requirements

For position boundaries, check that lower and upper ticks are ordered, in range, and divisible by the configured spacing. For the current price, check the protocol’s price/tick relationship and chosen price policy without imposing position-boundary alignment. See the Uniswap V3 example for pool-specific checks.

Scenarios

Local PCL tests also show that its direct slot0() call can revert before reaching the checks. Use snapshot-aware reads. Do not deploy this template unchanged as a Uniswap V3 price invariant. A tick within the global range is not proof of a fair price or adequate liquidity.

Legacy source

Reviewed source. See running and adapting examples for the pinned library revision.