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 incorrect variable ordering and test position.rs #10

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

shuhuiluo
Copy link
Owner

Corrected the order of sqrt_ratio_x96_upper and sqrt_ratio_x96_lower in both mint_amounts_with_slippage and burn_amounts_with_slippage methods in position.rs. Added a variety of tests to ensure these methods function as expected under different conditions, including min/max pool price and different position scenarios.

…osition.rs`

Corrected the order of `sqrt_ratio_x96_upper` and `sqrt_ratio_x96_lower` in both `mint_amounts_with_slippage` and `burn_amounts_with_slippage` methods in `position.rs`. Added a variety of tests to ensure these methods function as expected under different conditions, including min/max pool price and different position scenarios.
@shuhuiluo shuhuiluo requested a review from malik672 January 8, 2024 04:54
@shuhuiluo shuhuiluo self-assigned this Jan 8, 2024
Copy link

@gnarlycow gnarlycow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would recommend updating the returns: The sqrt ratios after slippage comment above ratios_after_slippage so the ordering is clear to readers without reading the code.

@shuhuiluo shuhuiluo changed the title Fixed incorrect variable ordering and tested position.rs Fix incorrect variable ordering and test position.rs Jan 8, 2024
@shuhuiluo shuhuiluo merged commit e32e8a7 into master Jan 8, 2024
2 checks passed
@shuhuiluo shuhuiluo deleted the position-test branch January 8, 2024 05:14
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.

2 participants