[CL][bug]: Non-monotonic square root function allows for multiple ticks to represent the same square root price #5517
Labels
F: concentrated-liquidity
Tracking the development of concentrated liquidity feature to improve filtering on the project board
T:bug 🐛
Something isn't working
Background
Since our
ApproxRoot
function is non-monotonic (ref: #5518), it is possible for multiple square root values to map to the same output. This allows for tick checks (potentially even those implemented in #5516) to be bypassed, risking another attack vector similar to #5493.Suggested Design
p1 > p0
, thenApproxRoot(p1) > ApproxRoot(p0)
regardless of error inApproxRoot
Acceptance Criteria
ApproxRoot
functionThe text was updated successfully, but these errors were encountered: