You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function can only return one or zero, which is wrong. UniswapV3 code is ratio >> 32 and adding the value instead sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
The text was updated successfully, but these errors were encountered:
Thanks for catching this! The lib still needs to be tested, feel free to make a PR fixing this if you would like, otherwise, Ill patch it in the interim.
The function in
tick_math.rs
returns incorrect result hereFunction can only return one or zero, which is wrong. UniswapV3 code is ratio >> 32 and adding the value instead
sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
The text was updated successfully, but these errors were encountered: