Skip to main content

get_sqrt_ratio_at_tick

Function get_sqrt_ratio_at_tick 

Source
pub fn get_sqrt_ratio_at_tick(tick: i32) -> U160
Expand description

Returns the sqrt ratio as a Q64.96 for the given tick. The sqrt ratio is computed as sqrt(1.0001)^tick.

§Arguments

  • tick: the tick for which to compute the sqrt ratio

§Returns

The sqrt ratio as a Q64.96

§Panics

Panics if the absolute tick exceeds PoolTick::MAX_TICK.