-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update get_min_ratio_per_position math logic #579
base: feat/multiple-position-support
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks interesting to me, would love to see the formulas work out and a small implementation. It would def make for better and cleaner code
## 1. Overview <!-- What are you changing, removing, or adding in this review? --> ## 2. Implementation details <!-- Describe the implementation (highlights only) as well as design rationale. --> ## 3. How to test/use <!-- How can people test/use this? --> ## 4. Checklist <!-- Checklist for PR author(s). --> - [ ] Does the Readme need to be updated? ## 5. Limitations (optional) <!-- Describe any limitation of the capabilities listed in the Overview section. --> ## 6. Future Work (optional) <!-- Describe follow up work, if any. --> --------- Co-authored-by: Laurens <32776056+LaurensKubat@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code lgtm, but some tests with big and and small potential numbers would be a good add
## 1. Overview <!-- What are you changing, removing, or adding in this review? --> ## 2. Implementation details <!-- Describe the implementation (highlights only) as well as design rationale. --> ## 3. How to test/use <!-- How can people test/use this? --> ## 4. Checklist <!-- Checklist for PR author(s). --> - [ ] Does the Readme need to be updated? ## 5. Limitations (optional) <!-- Describe any limitation of the capabilities listed in the Overview section. --> ## 6. Future Work (optional) <!-- Describe follow up work, if any. -->
1. Overview
Improving the logic within the get_min_ratio_per_position function to remove the dependency on an arbitrary liquidity amount. Algebra in README
2. Implementation details
After deriving the equation, we simply needed to rewrite the math according to the new formulas
3. How to test/use
cargo test-tube
4. Checklist
5. Limitations (optional)
6. Future Work (optional)