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

Fix tick_math.rs & add tests #10

Merged
merged 5 commits into from
Dec 19, 2022
Merged

Fix tick_math.rs & add tests #10

merged 5 commits into from
Dec 19, 2022

Conversation

Code0x2
Copy link
Contributor

@Code0x2 Code0x2 commented Dec 18, 2022

Fixes incorrect calculation in get_sqrt_ratio_at_tick
Current version can only return 0/1, when supposed to add 0/1 to ratio >> 32. The ratio multiplication is also wrong as it should be checked sequentially, and not in else if statements
Ported some tests from uniswapv3 repo too

@0xKitsune 0xKitsune changed the base branch from main to development December 19, 2022 00:20
@0xKitsune 0xKitsune merged commit 7e90545 into 0xKitsune:development Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants