duality-labs / duality

Apache License 2.0
10 stars 5 forks source link

ErrTickOutsideRange: wrong error text #310

Closed jcompagni10 closed 1 year ago

jcompagni10 commented 1 year ago

One cosmetic issue: Error ErrTickOutsideRange is defined providing the wrong valid range for tick usage.

// NOTE: -352,437 is the lowest possible tick at which price can be calculated with a < 1% error // when using 18 digit decimal precision (via sdk.Dec) const MaxTickExp uint64 = 352437

If someone places a tick outside this range, it will lead him to panicking:

jcompagni10 commented 1 year ago

this is fixed in unify liq PR