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

[CoW AMM] Fix uni 10k growth query #25

Merged
merged 1 commit into from
Sep 10, 2024
Merged

[CoW AMM] Fix uni 10k growth query #25

merged 1 commit into from
Sep 10, 2024

Conversation

fleupold
Copy link
Contributor

The original query was multiplying the initial assessment with the lp_token_price. This is wrong. If we want to compute the lp token amount we can get for 10k, we need to divide.

Similarly, in order to get the current value given the initial amount of lp tokens we need to multiply.

Copy link
Contributor

@fhenneke fhenneke left a comment

Choose a reason for hiding this comment

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

LGTM

@fleupold fleupold merged commit 581fe76 into main Sep 10, 2024
1 check passed
@fleupold fleupold deleted the fix_uni_profitability branch September 10, 2024 18:07
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