# TickMath

Contains the math to compute corresponding ticks and square root ratios (i.e. price).

Property | Type | Modifier | Description |
---|---|---|---|

MIN_TICK | number | static | The minimum tick of the pool. |

MAX_TICK | number | static | The maximum tick of the pool. |

MIN_SQRT_RATIO | static | The square root ratio (i.e. price) corresponding to the minimum tick. | |

MAX_SQRT_RATIO | static | The square root ratio (i.e. price) corresponding to the maximum tick. |

Private constructor that cannot be constructed.

Computes the square root ratio (i.e. price) at the specified tick.

Params | Type | Description |
---|---|---|

tick | number | The tick for which to compute the price. |

Type | Description |
---|---|

The square root ratio at the specified tick. |

Computes the tick corresponding to the specified square root ratio (i.e. price).

Params | Type | Description |
---|---|---|

sqrtRatioX96 | The square root ratio (i.e. price) at which to calculate the corresponding tick. |

Type | Description |
---|---|

The tick corresponding to the square root ratio. |

Last modified 4mo ago