Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CL]: Investigate feasibility of bounding min/max price to avoid any use of canonical ticks #5524

Closed
AlpinYukseloglu opened this issue Jun 14, 2023 · 2 comments
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board

Comments

@AlpinYukseloglu
Copy link
Contributor

Background

The notion of "canonical ticks" at the extreme ends of our supported prices is one of the primary sources of loss of monotonicity in our tick to sqrt price conversions (the other being our non-monotonic ApproxRoot function, which is described in #5517 and more easily fixable).

Given how the issue only seems to arise at ticks that are close to our MinTick, we should investigate whether it can be avoided altogether by simply moving this value slightly higher.

Suggested Design

  • Find the first tick where canonical ticks become an issue (in either direction, but I believe it should only apply for smaller prices)
  • See how much the corresponding minimum supported price would need to be moved to avoid canonical ticks
  • If the final price is smaller than 10^-14 (Coingecko's min price), then move it and remove canonical tick logic

Acceptance Criteria

  • All new and existing tests should pass
  • Monotonicity sanity tests should be added around bounds
@AlpinYukseloglu AlpinYukseloglu added the F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board label Jun 14, 2023
@p0mvn
Copy link
Member

p0mvn commented Jun 26, 2023

AFAIK, this is now addressed. Can we close this?

@AlpinYukseloglu
Copy link
Contributor Author

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board
Projects
None yet
Development

No branches or pull requests

2 participants