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

Update get_min_ratio_per_position math logic #579

Open
wants to merge 10 commits into
base: feat/multiple-position-support
Choose a base branch
from

Conversation

njerschow
Copy link
Contributor

@njerschow njerschow commented Mar 6, 2024

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

  • Does the Readme need to be updated?

5. Limitations (optional)

6. Future Work (optional)

Copy link
Contributor

@LaurensKubat LaurensKubat left a 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

LaurensKubat and others added 5 commits April 2, 2024 21:48
## 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>
@njerschow njerschow changed the title a small writeup of an improvement idea Update get_min_ratio_per_position math logic Apr 3, 2024
Copy link
Contributor

@LaurensKubat LaurensKubat left a 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

@LaurensKubat LaurensKubat self-requested a review April 10, 2024 14:12
## 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. -->
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